Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for alternative OS/compilers
- Loading branch information
Showing
9 changed files
with
304 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
def common | ||
pipeline { | ||
agent none | ||
options { | ||
newContainerPerStage() | ||
} | ||
environment { | ||
LC_ALL = 'C.UTF-8' | ||
} | ||
// stages are ordered according to execution time; highest time first | ||
// nodes are selected based on a priority (in Jenkins config) | ||
stages { | ||
stage('Environment') { | ||
agent { | ||
label 'linux' | ||
} | ||
steps { | ||
script { | ||
if (changeRequest()) { | ||
def buildNumber = env.BUILD_NUMBER as int | ||
if (buildNumber > 1) milestone(buildNumber - 1) | ||
milestone(buildNumber) | ||
} | ||
common = load("${env.workspace}/.CI/common.groovy") | ||
} | ||
} | ||
} | ||
stage('builds') { | ||
parallel { | ||
stage('clang-32bit') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-32' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-clang-32-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " + | ||
"--privileged" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('clang', 'clang++', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
// gcc-4.9 jessie | ||
stage('gcc-4.9 (Debian Jessie)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-jessie' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-gcc-4.9-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
HOME = "/cache/runtest" | ||
} | ||
steps { | ||
script { | ||
// Otherwise old git fails to clone... | ||
sh 'git config --global user.name OpenModelica' | ||
sh 'git config --global user.email openmodelica@ida.liu.se' | ||
common.buildOMC('gcc-4.9', 'g++-4.9', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
stage('clang-3.5 (Debian Jessie)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-jessie' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-clang-3.5-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
HOME = "/cache/runtest" | ||
} | ||
steps { | ||
script { | ||
// Otherwise old git fails to clone... | ||
sh 'git config --global user.name OpenModelica' | ||
sh 'git config --global user.email openmodelica@ida.liu.se' | ||
common.buildOMC('clang-3.5', 'clang++-3.5', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
// gcc-5 Ubuntu Xenial | ||
stage('gcc-5') { | ||
steps { | ||
print "Ubuntu Xenial GCC 5 tested on every pull request" | ||
} | ||
} | ||
stage('clang-3.8 (Ubuntu Xenial)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-xenial' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-clang-3.8-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('clang-3.8', 'clang++-3.8', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
// gcc-6 Debian stretch | ||
stage('gcc-6 (Debian Stretch)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-stretch' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-gcc-6-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('gcc-6', 'g++-6', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
// clang 3.8 also in Debian stretch... | ||
// gcc-7 Ubuntu Bionic | ||
stage('gcc-7 (Ubuntu Bionic)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-gcc-7-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('gcc-7', 'g++-7', '--without-hwloc') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
stage('clang-6.0') { | ||
steps { | ||
print "Ubuntu Bionic clang 6.0 tested on every pull request" | ||
} | ||
} | ||
// gcc-8 in Ubuntu Disco | ||
stage('gcc-8 (Ubuntu Disco)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-disco' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-gcc-8-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('gcc-8', 'g++-8', '') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
stage('clang-8 (Ubuntu Disco)') { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--pull' | ||
dir '.CI/cache-disco' | ||
label 'linux' | ||
args "--mount type=volume,source=runtest-clang-8-cache,target=/cache/runtest " + | ||
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary" | ||
} | ||
} | ||
environment { | ||
RUNTESTDB = "/cache/runtest/" | ||
LIBRARIES = "/cache/omlibrary" | ||
} | ||
steps { | ||
script { | ||
common.buildOMC('clang-8', 'clang++-8', '') | ||
common.makeLibsAndCache() | ||
common.buildGUI('') | ||
common.partest() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Cannot be parametrized in Jenkins... | ||
FROM docker.openmodelica.org/build-deps:v1.13-i386 | ||
|
||
# We don't know the uid of the user who will build, so make the /cache directories world writable | ||
|
||
RUN mkdir -p /cache/runtest/ /cache/omlibrary/ && chmod ugo+rwx /cache/runtest/ /cache/omlibrary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Cannot be parametrized in Jenkins... | ||
FROM docker.openmodelica.org/build-deps:v1.13-disco | ||
|
||
# We don't know the uid of the user who will build, so make the /cache directories world writable | ||
|
||
RUN mkdir -p /cache/runtest/ /cache/omlibrary/ && chmod ugo+rwx /cache/runtest/ /cache/omlibrary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Cannot be parametrized in Jenkins... | ||
FROM docker.openmodelica.org/build-deps:v1.13-jessie | ||
|
||
# We don't know the uid of the user who will build, so make the /cache directories world writable | ||
|
||
RUN mkdir -p /cache/runtest/ /cache/omlibrary/ && chmod ugo+rwx /cache/runtest/ /cache/omlibrary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Cannot be parametrized in Jenkins... | ||
FROM docker.openmodelica.org/build-deps:v1.13-stretch | ||
|
||
# We don't know the uid of the user who will build, so make the /cache directories world writable | ||
|
||
RUN mkdir -p /cache/runtest/ /cache/omlibrary/ && chmod ugo+rwx /cache/runtest/ /cache/omlibrary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.