forked from 0ad/0ad
Update build/ dockerfiles & jenkinsfiles
This reflects their current state on the VM/Jenkins. Differential Revision: https://code.wildfiregames.com/D3133 This was SVN commit r25149.
This commit is contained in:
parent
37cc13010c
commit
4146428825
54
build/jenkins/dockerfiles/build-base.Dockerfile
Normal file
54
build/jenkins/dockerfiles/build-base.Dockerfile
Normal file
@ -0,0 +1,54 @@
|
||||
FROM debian:buster
|
||||
|
||||
RUN useradd -ms /bin/bash --uid 1006 builder
|
||||
|
||||
RUN apt-get -qq update
|
||||
|
||||
# 0 A.D. dependencies.
|
||||
RUN apt-get install -qqy \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libclang-7-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libenet-dev \
|
||||
libfmt-dev \
|
||||
libgloox-dev \
|
||||
libgnutls28-dev \
|
||||
libgtk-3-dev \
|
||||
libicu-dev \
|
||||
libidn11-dev \
|
||||
libjson-perl \
|
||||
libminiupnpc-dev \
|
||||
libogg-dev \
|
||||
libopenal-dev \
|
||||
libpng-dev \
|
||||
libsodium-dev \
|
||||
libsdl2-dev \
|
||||
libvorbis-dev \
|
||||
libwxgtk3.0-dev \
|
||||
libxcursor-dev \
|
||||
libxml2-dev \
|
||||
libxml-simple-perl \
|
||||
llvm-7 \
|
||||
zlib1g-dev \
|
||||
&& apt-get clean
|
||||
|
||||
# Other utilities
|
||||
RUN apt-get install -qqy \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
rsync \
|
||||
subversion \
|
||||
vim \
|
||||
mkdocs
|
||||
|
||||
# Install rust and Cargo via rustup
|
||||
USER builder
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
ENV PATH="${PATH}:/home/builder/.cargo/bin"
|
||||
USER root
|
||||
|
||||
ENV SHELL /bin/bash
|
@ -1,43 +0,0 @@
|
||||
FROM gcc:6
|
||||
|
||||
RUN useradd -ms /bin/bash --uid 1006 builder
|
||||
|
||||
RUN apt-get -qq update && apt-get -qq upgrade
|
||||
RUN apt-get install -qqy cmake libcurl4-gnutls-dev libenet-dev \
|
||||
libgnutls28-dev libgtk-3-dev libicu-dev libidn11-dev libjson-perl \
|
||||
libminiupnpc-dev libnspr4-dev libpython-dev libogg-dev \
|
||||
libopenal-dev libpng-dev libsdl2-dev libvorbis-dev libxml2-dev \
|
||||
libxml-simple-perl subversion zlib1g-dev
|
||||
|
||||
ADD libsodium-1.0.17.tar.gz /root/libsodium/
|
||||
RUN cd /root/libsodium/libsodium-1.0.17 \
|
||||
&& ./configure \
|
||||
&& make && make check \
|
||||
&& make install
|
||||
|
||||
ADD boost_1_67_0.tar.bz2 /root/boost/
|
||||
RUN cd /root/boost/boost_1_67_0 \
|
||||
&& ./bootstrap.sh --with-libraries=filesystem \
|
||||
&& ./b2 install
|
||||
|
||||
ADD gloox-1.0.22.tar.bz2 /root/gloox/
|
||||
RUN cd /root/gloox/gloox-1.0.22 \
|
||||
&& ./configure \
|
||||
&& make && make check \
|
||||
&& make install
|
||||
|
||||
ADD wxWidgets-3.0.4.tar.bz2 /root/wxWidgets/
|
||||
RUN cd /root/wxWidgets/wxWidgets-3.0.4 \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
USER builder
|
||||
ENV SHELL /bin/bash
|
||||
|
||||
ENV LIBCC gcc
|
||||
ENV LIBCXX g++
|
||||
ENV PSCC gcc
|
||||
ENV PSCXX g++
|
10
build/jenkins/dockerfiles/gcc7.Dockerfile
Normal file
10
build/jenkins/dockerfiles/gcc7.Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM build-base:latest
|
||||
|
||||
RUN apt-get install -qqy gcc-7 g++-7
|
||||
|
||||
USER builder
|
||||
|
||||
ENV LIBCC gcc-7
|
||||
ENV LIBCXX g++-7
|
||||
ENV PSCC gcc-7
|
||||
ENV PSCXX g++-7
|
@ -1,17 +1,9 @@
|
||||
FROM gcc:8
|
||||
FROM build-base
|
||||
|
||||
RUN useradd -ms /bin/bash --uid 1006 builder
|
||||
# This silences a transifex-client warning
|
||||
RUN apt-get install -qqy git
|
||||
|
||||
RUN apt-get -qq update && apt-get -qq upgrade
|
||||
RUN apt-get install -qqy cmake git gettext libxml2-dev python python-pip subversion
|
||||
|
||||
RUN pip2 install transifex-client lxml
|
||||
|
||||
RUN git clone https://anongit.kde.org/pology.git /root/pology
|
||||
RUN mkdir /root/pology/build
|
||||
WORKDIR /root/pology/build
|
||||
RUN cmake ..
|
||||
RUN make && make install
|
||||
RUN pip3 install transifex-client lxml babel
|
||||
|
||||
USER builder
|
||||
COPY --chown=builder transifexrc /home/builder/.transifexrc
|
||||
|
96
build/jenkins/pipelines/docker-custom.Jenkinsfile
Normal file
96
build/jenkins/pipelines/docker-custom.Jenkinsfile
Normal file
@ -0,0 +1,96 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 0 A.D. is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'LinuxSlave'
|
||||
customWorkspace '/zpool0/trunk'
|
||||
}
|
||||
}
|
||||
parameters {
|
||||
string(name: 'DIFF_ID', defaultValue: '', description: '(optional) ID of the Phabricator Differential.')
|
||||
booleanParam(name: 'NO_PCH', defaultValue: false, description: 'Run this build without PCH.')
|
||||
booleanParam(name: 'DEBUG', defaultValue: false, description: 'Compile in debug mode.')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Setup") {
|
||||
steps {
|
||||
sh "sudo zfs clone zpool0/gcc7@latest zpool0/custom"
|
||||
}
|
||||
}
|
||||
stage("Apply Differential") {
|
||||
when {
|
||||
expression { return params.DIFF_ID != "" }
|
||||
}
|
||||
steps {
|
||||
ws("/zpool0/custom") {
|
||||
sh "arc patch --diff ${params.DIFF_ID} --force"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("PCH clean up") {
|
||||
when {
|
||||
expression { return params.NO_PCH }
|
||||
}
|
||||
steps {
|
||||
ws("/zpool0/custom") {
|
||||
sh "rm -rf build/workspaces/gcc/"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("Build") {
|
||||
steps {
|
||||
script {
|
||||
ws("/zpool0/custom") {
|
||||
// Destroy test *.cpp files as they use (invalid) absolute paths.
|
||||
sh 'python3 -c \"import glob; print(\\\" \\\".join(glob.glob(\\\"source/**/tests/**.cpp\\\", recursive=True)));\" | xargs rm -v'
|
||||
// Hack: ignore NVTT
|
||||
sh "echo '' > libraries/source/nvtt/build.sh"
|
||||
docker.image("0ad-gcc7:latest").inside {
|
||||
stage("Update Workspaces") {
|
||||
if (params.NO_PCH) {
|
||||
sh "build/workspaces/update-workspaces.sh -j1 --without-pch"
|
||||
} else {
|
||||
sh "build/workspaces/update-workspaces.sh -j1"
|
||||
}
|
||||
}
|
||||
stage("Build") {
|
||||
if (params.DEBUG) {
|
||||
sh "cd build/workspaces/gcc/ && make -j1 config=debug"
|
||||
}
|
||||
sh "cd build/workspaces/gcc/ && make -j1 config=release"
|
||||
}
|
||||
stage("Run tests") {
|
||||
if (params.DEBUG) {
|
||||
sh "binaries/system/test_dbg"
|
||||
}
|
||||
sh "binaries/system/test"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh "sudo zfs destroy zpool0/custom"
|
||||
}
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
|
||||
// This pipeline is used to build patches on various compilers.
|
||||
|
||||
def compilers = ["gcc6"]
|
||||
def compilers = ["gcc7"]
|
||||
|
||||
def patchesMap = compilers.collectEntries {
|
||||
["${it}": patch(it)]
|
||||
@ -50,7 +50,12 @@ def build(compiler) {
|
||||
|
||||
try {
|
||||
retry(3) {
|
||||
try {
|
||||
sh "cd build/workspaces/gcc/ && make -j1 config=debug 2> ../../../builderr-debug-${compiler}.txt"
|
||||
} catch(e) {
|
||||
sh "rm -rf build/workspaces/gcc/obj/test_Debug"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
throw e
|
||||
@ -69,7 +74,12 @@ def build(compiler) {
|
||||
|
||||
try {
|
||||
retry(3) {
|
||||
try {
|
||||
sh "cd build/workspaces/gcc/ && make -j1 config=release 2> ../../../builderr-release-${compiler}.txt"
|
||||
} catch(e) {
|
||||
sh "rm -rf build/workspaces/gcc/obj/test_Release"
|
||||
throw e
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
throw e
|
||||
@ -161,10 +171,12 @@ pipeline {
|
||||
}
|
||||
stage("Data checks") {
|
||||
steps {
|
||||
warnError('CheckRefs.pl script failed!') {
|
||||
sh "cd source/tools/entity/ && perl checkrefs.pl --check-map-xml --validate-templates 2> data-errors.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -18,7 +18,7 @@
|
||||
// This pipeline is used to build a clean base from scratch in order to
|
||||
// use ZFS snapshots efficiently.
|
||||
|
||||
def compilers = ["gcc6"]
|
||||
def compilers = ["gcc7"]
|
||||
|
||||
def volumeUpdatesMap = compilers.collectEntries {
|
||||
["${it}": volumeUpdate(it)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -40,16 +40,16 @@ pipeline {
|
||||
environment name: 'no-cache', value: 'true'
|
||||
}
|
||||
steps {
|
||||
sh 'docker build --no-cache -t 0ad-gcc6 ~/dockerfiles/gcc6'
|
||||
// WIP: clang and recent gccs
|
||||
sh 'docker build --no-cache -t build-base ~/dockerfiles/build-base'
|
||||
sh 'docker build --no-cache -t 0ad-gcc7 ~/dockerfiles/gcc7'
|
||||
sh 'docker build --no-cache -t 0ad-coala ~/dockerfiles/coala'
|
||||
sh 'docker build --no-cache -t 0ad-translations ~/dockerfiles/translations'
|
||||
}
|
||||
}
|
||||
stage("Build") {
|
||||
steps {
|
||||
sh 'docker build -t 0ad-gcc6 ~/dockerfiles/gcc6'
|
||||
// WIP: clang and recent gccs
|
||||
sh 'docker build -t build-base ~/dockerfiles/build-base'
|
||||
sh 'docker build -t 0ad-gcc7 ~/dockerfiles/gcc7'
|
||||
sh 'docker build -t 0ad-coala ~/dockerfiles/coala'
|
||||
sh 'docker build -t 0ad-translations ~/dockerfiles/translations'
|
||||
}
|
||||
@ -71,7 +71,6 @@ pipeline {
|
||||
sh "sudo zfs destroy -R zpool0/trunk@latest || true"
|
||||
|
||||
sh "sudo zfs snapshot zpool0/trunk@base"
|
||||
sh "sudo zfs clone zpool0/trunk@base zpool0/gcc6"
|
||||
sh "sudo zfs clone zpool0/trunk@base zpool0/gcc7"
|
||||
|
||||
sh "sudo zfs snapshot zpool0/trunk@latest"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
// In case of success, it provides a clean base for incremental builds
|
||||
// with the `differential` pipeline.
|
||||
|
||||
def compilers = ["gcc6"]
|
||||
def compilers = ["gcc7"]
|
||||
|
||||
def volumeUpdatesMap = compilers.collectEntries {
|
||||
["${it}": volumeUpdate(it)]
|
||||
@ -52,6 +52,9 @@ def build(compiler) {
|
||||
echo (message: readFile (file: "cxxtest-debug-${compiler}.xml"))
|
||||
throw e
|
||||
} finally {
|
||||
catchError {
|
||||
sh "sed -i 's/date/timestamp/g' cxxtest-debug-${compiler}.xml"
|
||||
}
|
||||
stash includes: "cxxtest-debug-${compiler}.xml", name: "tests-debug-${compiler}"
|
||||
}
|
||||
|
||||
@ -62,6 +65,9 @@ def build(compiler) {
|
||||
echo (message: readFile (file: "cxxtest-release-${compiler}.xml"))
|
||||
throw e
|
||||
} finally {
|
||||
catchError {
|
||||
sh "sed -i 's/date/timestamp/g' cxxtest-release-${compiler}.xml"
|
||||
}
|
||||
stash includes: "cxxtest-release-${compiler}.xml", name: "tests-release-${compiler}"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -24,6 +24,7 @@ pipeline {
|
||||
parameters {
|
||||
string(name: 'DIFF_ID', defaultValue: '', description: 'ID of the Phabricator Differential.')
|
||||
string(name: 'PHID', defaultValue: '', description: 'Phabricator ID')
|
||||
booleanParam(name: 'CLEAN_WORKSPACE', defaultValue: false, description: 'Delete the workspace before compiling (NB: does not delete the compiled libraries)')
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -64,7 +65,13 @@ pipeline {
|
||||
}
|
||||
stage("Update workspaces") {
|
||||
steps {
|
||||
sh "cd build/workspaces/ && ./update-workspaces.sh -j4 --atlas --jenkins-tests"
|
||||
script {
|
||||
if (params.CLEAN_WORKSPACE) {
|
||||
sh "rm -rf build/workspaces/gcc"
|
||||
}
|
||||
sh "cd build/workspaces/ && ./update-workspaces.sh -j4 --jenkins-tests"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
stage("Debug Build & Tests") {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -21,6 +21,7 @@ pipeline {
|
||||
parameters {
|
||||
string(name: 'SVN_REV', defaultValue: '', description: 'For instance 21000')
|
||||
string(name: 'PHID', defaultValue: '', description: 'Phabricator ID')
|
||||
booleanParam(name: 'CLEAN_WORKSPACE', defaultValue: false, description: 'Delete the workspace before compiling (NB: does not delete the compiled libraries)')
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -49,7 +50,12 @@ pipeline {
|
||||
}
|
||||
stage("Update workspaces") {
|
||||
steps {
|
||||
sh "cd build/workspaces/ && ./update-workspaces.sh -j4 --atlas --jenkins-tests"
|
||||
script {
|
||||
if (params.CLEAN_WORKSPACE) {
|
||||
sh "rm -rf build/workspaces/gcc"
|
||||
}
|
||||
sh "cd build/workspaces/ && ./update-workspaces.sh -j4 --jenkins-tests"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("Debug Build & Tests") {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -61,8 +61,8 @@ pipeline {
|
||||
echo "atlas is enabled"
|
||||
AtlasOption = "--atlas"
|
||||
AtlasPrj = "/t:AtlasUI"
|
||||
bat "(robocopy /MIR C:\\wxwidgets3.0.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR C:\\wxwidgets3.0.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR C:\\wxwidgets-3.1.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "(robocopy /MIR C:\\wxwidgets-3.1.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
|
||||
bat "del binaries\\system\\AtlasUI.dll"
|
||||
}
|
||||
if (env.gloox == 'true') {
|
||||
@ -85,14 +85,14 @@ pipeline {
|
||||
|
||||
stage ('Build') {
|
||||
steps {
|
||||
bat("cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v140_xp /t:pyrogenesis ${AtlasPrj} /t:test /p:Configuration=Release")
|
||||
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis ${AtlasPrj} /t:test /p:Configuration=Release")
|
||||
}
|
||||
}
|
||||
|
||||
stage ('Build debug glooxwrapper') {
|
||||
when { environment name: 'gloox', value: 'true'}
|
||||
steps {
|
||||
bat("cd build\\workspaces\\vc2015 && MSBuild.exe pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v140_xp /t:glooxwrapper /p:Configuration=Debug")
|
||||
bat("cd build\\workspaces\\vs2017 && \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /m:${jobs} /p:PlatformToolset=v141_xp /t:glooxwrapper /p:Configuration=Debug")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user