mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Generate technical docs from CI/CD
- Generate entity.rng as part of the nightly build, refs #6976. - Generate docs from a checkout of the nightly build. - Publish them to docs.wildfiregames.com.
This commit is contained in:
parent
2b324fdd94
commit
75da070076
3 changed files with 49 additions and 36 deletions
17
build/jenkins/dockerfiles/docs-tools.Dockerfile
Normal file
17
build/jenkins/dockerfiles/docs-tools.Dockerfile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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 \
|
||||
make \
|
||||
python3 \
|
||||
subversion \
|
||||
xsltproc \
|
||||
&& apt-get clean
|
||||
|
||||
RUN git lfs install --system --skip-smudge
|
||||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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,51 @@
|
|||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'LinuxSlave'
|
||||
dockerfile {
|
||||
label 'LinuxAgent'
|
||||
customWorkspace "workspace/technical-docs"
|
||||
dir 'build/jenkins/dockerfiles'
|
||||
filename "docs-tools.Dockerfile"
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Setup") {
|
||||
stage("Pull documentation assets") {
|
||||
steps {
|
||||
sh "sudo zfs clone zpool0/gcc7@latest zpool0/entity-docs"
|
||||
sh "git lfs pull -I docs/doxygen"
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
sh "cd binaries/system/ && svn export --force https://svn.wildfiregames.com/nightly-build/trunk/binaries/system/entity.rng"
|
||||
sh "cd source/tools/entdocs/ && ./build.sh"
|
||||
sh "cd source/tools/entdocs/ && mv entity-docs.html 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: 'source/tools/entdocs/nightly.html', removePrefix: 'source/tools/entdocs', remoteDirectory: 'entity-docs'),
|
||||
sshTransfer(sourceFiles: 'source/tools/templatesanalyzer/index.html', removePrefix: 'source/tools/templatesanalyzer', remoteDirectory: 'templatesanalyzer'),
|
||||
]
|
||||
)]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue