Skip to content

Commit

Permalink
Use a newer docker image for cmake build (#7958)
Browse files Browse the repository at this point in the history
Xenial is outdated and the ca-certs no longer work.
# Conflicts:
#	Jenkinsfile
resolved with accept both
  • Loading branch information
rfranke authored and adrpo committed Nov 17, 2021
1 parent 84f3e9b commit abd37b5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .CI/cache-without-cmake/Dockerfile
@@ -0,0 +1,7 @@
# Cannot be parametrized in Jenkins...
FROM docker.openmodelica.org/build-deps:v1.16.3

# 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/ \
&& apt-get remove -qy cmake cmake-data
35 changes: 35 additions & 0 deletions Jenkinsfile
Expand Up @@ -176,6 +176,41 @@ pipeline {
//stash name: 'omc-centos7', includes: 'build/**, **/config.status'
}
}
stage('cmake-gcc') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache-without-cmake'
label 'linux'
args "-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
args "--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
}
}
when {
beforeAgent true
expression { !shouldWeSkipCMakeBuild_value }
}
environment {
CC = "gcc-5"
CXX = "g++-5"
}
steps {
script {
echo "Download and install CMake 3.17.2"
sh '''
wget "cmake.org/files/v3.17/cmake-3.17.2-Linux-x86_64.sh"
mkdir -p /tmp/cmake
sh cmake-3.17.2-Linux-x86_64.sh --prefix=/tmp/cmake --skip-license
/tmp/cmake/bin/cmake --version
'''
common.buildOMC_CMake('-DCMAKE_BUILD_TYPE=Release -DOMC_USE_CCACHE=OFF -DCMAKE_INSTALL_PREFIX=build', '/tmp/cmake/bin/cmake')
sh "build/bin/omc --help"
sh "build/bin/omc --version"
}
// stash name: 'omc-cmake-gcc', includes: 'OMCompiler/build_cmake/install_cmake/bin/**'
}
}
stage('checks') {
agent {
docker {
Expand Down

0 comments on commit abd37b5

Please sign in to comment.