1
0
forked from 0ad/0ad

Compare commits

...

1 Commits
main ... docs

Author SHA1 Message Date
a4f3f5e64d
Generate technical docs from CI/CD
- Generate entity.rng as part of the nightly build
- Generate docs from a checkout of the nightly build
- Publish them to docs.wildfiregames.com
2024-09-24 22:19:09 +02:00
3 changed files with 52 additions and 36 deletions

View File

@ -0,0 +1,14 @@
FROM debian:latest
ARG DEBIAN_FRONTEND=noninteractive
ARG DEBCONF_NOWARNINGS="yes"
RUN apt-get -qqy update && apt-get install -qqy --no-install-recommends \
ca-certificates \
cmake \
doxygen \
git-lfs \
graphviz \
xsltproc \
&& apt-get clean
RUN git lfs install --system --skip-smudge

View File

@ -78,6 +78,12 @@ pipeline {
}
}
stage("Generate entity XML schema") {
steps {
bat "cd binaries\\system && pyrogenesis.exe -mod=public -dumpSchema"
}
}
stage("Check-in SPIRV generation rules") {
when {
expression { env.spirv_rules_FILENAME }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,61 +19,57 @@
pipeline {
agent {
node {
label 'LinuxSlave'
dockerfile {
label 'LinuxAgent'
customWorkspace "workspace/technical-docs"
dir 'build/jenkins/dockerfiles'
filename "docs-tools.Dockerfile"
}
}
parameters {
stashedFile(name: 'entityrng', description: 'ONLY DURING DEVELOPMENT')
}
stages {
stage("Setup") {
stage("Pull game assets") {
steps {
sh "sudo zfs clone zpool0/gcc7@latest zpool0/entity-docs"
sh "git lfs pull"
}
}
stage("Engine docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd docs/doxygen/ && doxygen config"
}
}
}
stage("Build") {
steps {
ws("/zpool0/entity-docs"){
sh "build/workspaces/update-workspaces.sh --disable-atlas --without-tests -j1"
sh "cd build/workspaces/gcc/ && make pyrogenesis -j1"
}
sh "cd docs/doxygen/ && doxygen config"
}
}
stage("Entity docs") {
steps {
ws("/zpool0/entity-docs"){
sh "cd binaries/system/ && ./pyrogenesis -mod=public -dumpSchema"
sh "cd source/tools/entdocs/ && ./build.sh"
}
// TODO: replace this with "cd binaries/system/ && svn export --force https://svn.wildfiregames.com/nightly-build/trunk/binaries/system/entity.rng"
unstash 'entityrng'
sh "mv entityrng binaries/system/entity.rng"
sh "cd source/tools/entdocs/ && ./build.sh"
sh "mv tools/entdocs/entity-docs.html tools/entdocs/nightly.html"
}
}
stage("Template Analyzer") {
steps {
ws("/zpool0/entity-docs"){
sh "cd source/tools/templatesanalyzer/ && python3 unit_tables.py"
}
sh "cd source/tools/templatesanalyzer/ && python3 unit_tables.py"
sh "mv source/tools/templatesanalyzer/unit_summary_table.html source/tools/templatesanalyzer/index.html"
}
}
stage("Upload") {
steps {
ws("/zpool0/entity-docs"){
sh "rsync -rti --delete-after --progress docs/doxygen/html/ docs.wildfiregames.com:~/www/pyrogenesis/"
sh "rsync -ti --progress source/tools/entdocs/entity-docs.html docs.wildfiregames.com:~/www/entity-docs/trunk.html"
sh "rsync -ti --progress source/tools/templatesanalyzer/unit_summary_table.html docs.wildfiregames.com:~/www/templatesanalyzer/index.html"
}
}
}
}
post {
always {
ws("/zpool0/trunk") {
sleep 10
sh "sudo zfs destroy zpool0/entity-docs"
sshPublisher alwaysPublishFromMaster: true, failOnError: true, publishers: [
sshPublisherDesc(configName: 'docs.wildfiregames.com', transfers: [
sshTransfer(sourceFiles: 'docs/doxygen/html/**', removePrefix: 'docs/doxygen/html', remoteDirectory: 'pyrogenesis'),
sshTransfer(sourceFiles: 'tools/entdocs/nightly.html', removePrefix: 'tools/entdocs', remoteDirectory: 'entity-docs'),
sshTransfer(sourceFiles: 'source/tools/templatesanalyzer/index.html', removePrefix: 'source/tools/templatesanalyzer', remoteDirectory: 'templatesanalyzer'),
]
)]
}
}
}