Skip to content

Commit

Permalink
Update Docker images to Jammy (#11027)
Browse files Browse the repository at this point in the history
* Updating Docker images to docker.openmodelica.org/build-deps:v1.22.1

  - Removed all outdated Docker images (reached EOL)

* Updating Jenkinsfile to use build-deps:v1.22.0

* Updating autoconf

* No more Xenial, no more gcc 5 🎉

* No more special path for CMake

* Update Inkscape commands

  - "--file / -f" is depreacted
  - "--export-pdf" and so on are deprecated

* Fixing User's Guide

  - Updated commands to Inkscape 1.0
  - Updated Pandoc command
  - Don't use .* file extension in rst files (breaks pdf)
    - Changed all figures to png

* Updating MSL32 test to verify

* Cheat and only run OpenCL on Intel

* Fixing tests

* Fixing OpenCL warnings

  - Removed sin,cos re-definition
  - Added -Werror to show all warnings by makin them errors

* Remove failing C++ HPCOM test
  • Loading branch information
AnHeuermann committed Sep 7, 2023
1 parent 9c4c99f commit d8fb273
Show file tree
Hide file tree
Showing 40 changed files with 99 additions and 470 deletions.
207 changes: 0 additions & 207 deletions .CI/Jenkinsfile.more-compilers
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ pipeline {
newContainerPerStage()
buildDiscarder(logRotator(numToKeepStr: "100", artifactNumToKeepStr: "2"))
}
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 {
Expand All @@ -28,215 +25,11 @@ pipeline {
}
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()
}
}
}
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions .CI/cache-32/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .CI/cache-bionic-cmake-3.17.2/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .CI/cache-disco/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .CI/cache-jessie/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .CI/cache-stretch/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions .CI/cache-xenial/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .CI/cache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cannot be parametrized in Jenkins...
FROM docker.openmodelica.org/build-deps:v1.16.4
FROM docker.openmodelica.org/build-deps:v1.22.1

# We don't know the uid of the user who will build, so make the /cache directories world writable

Expand Down
4 changes: 0 additions & 4 deletions .CI/clang-tools/Dockerfile

This file was deleted.

14 changes: 7 additions & 7 deletions .CI/cmake/Jenkinsfile.cmake.ubuntu.gcc.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pipeline {
}
stage('build') {
parallel {
stage('autoconf-bionic-gcc') {
stage('autoconf-jammy-gcc') {
agent {
docker {
image 'docker.openmodelica.org/build-deps:v1.16.3'
image 'docker.openmodelica.org/build-deps:v1.22.1'
label 'linux'
alwaysPull true
args "--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
Expand All @@ -37,11 +37,11 @@ pipeline {
stash name: 'omc-gcc', includes: 'build/bin/OMCppOSUSimulation, build/include/omc/omsi/**, build/include/omc/omsic/**, build/lib/x86_64-linux-gnu/omc/omsi/**, build/lib/x86_64-linux-gnu/omc/omsicpp/**, **/config.status'
}
}
stage('cmake-bionic-gcc') {
stage('cmake-jammy-gcc') {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache-bionic-cmake-3.17.2'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
"-v /var/lib/jenkins/gitcache:/var/lib/jenkins/gitcache"
Expand All @@ -68,7 +68,7 @@ pipeline {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache-bionic-cmake-3.17.2'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
Expand All @@ -93,7 +93,7 @@ pipeline {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache-bionic-cmake-3.17.2'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
Expand All @@ -118,7 +118,7 @@ pipeline {
agent {
dockerfile {
additionalBuildArgs '--pull'
dir '.CI/cache-bionic-cmake-3.17.2'
dir '.CI/cache'
label 'linux'
args "--mount type=volume,source=runtest-gcc-cache,target=/cache/runtest " +
"--mount type=volume,source=omlibrary-cache,target=/cache/omlibrary " +
Expand Down
6 changes: 3 additions & 3 deletions .CI/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void buildOMC(CC, CXX, extraFlags, Boolean buildCpp, Boolean clean) {
%OMDEV%\\tools\\msys\\usr\\bin\\sh --login -i -c "cd `cygpath '${WORKSPACE}'` && chmod +x buildOMCWindows.sh && ./buildOMCWindows.sh && rm -f ./buildOMCWindows.sh"
""")
} else {
sh 'autoconf'
sh 'autoreconf --install'
// Note: Do not use -march=native since we might use an incompatible machine in later stages
def withCppRuntime = buildCpp ? "--with-cppruntime":"--without-cppruntime"
sh "./configure CC='${CC}' CXX='${CXX}' FC=gfortran CFLAGS=-Os ${withCppRuntime} --without-omc --without-omlibrary --with-omniORB --enable-modelica3d --prefix=`pwd`/install ${extraFlags}"
Expand Down Expand Up @@ -367,7 +367,7 @@ void buildGUI(stash, isQt5) {
standardSetup()
unstash stash
}
sh 'autoconf'
sh 'autoreconf --install'
if (stash) {
patchConfigStatus()
}
Expand Down Expand Up @@ -412,7 +412,7 @@ void buildAndRunOMEditTestsuite(stash) {
standardSetup()
unstash stash
}
sh 'autoconf'
sh 'autoreconf --install'
if (stash) {
patchConfigStatus()
}
Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ continuous integration.
We added three images that are used by the continuous integration used to compile or test
the pull requests on github.com/OpenModelica/OpenMOdelica.

- [build-deps-v1.16.4](./build-deps-v1.16.4/devcontainer.json): Default build image to
- [build-deps-v1.22](./build-deps-v1.22/devcontainer.json): Default build image to
compile OpenModelica.
- [cache-bionic-cmake-3.17.2](./cache-bionic-cmake-3.17.2/devcontainer.json): Build
image used to compile OpenModelica with CMake.
- [fmuchecker](./fmuchecker/devcontainer.json): Image with FMU checker to test generated
FMUs.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG BASE_IMAGE

FROM ${BASE_IMAGE}

ENV SHELL /bin/bash
Expand All @@ -8,12 +7,16 @@ ARG USERNAME=openmodelica-user
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Additional software (gdb, valgrind)
RUN apt-get update \
&& apt-get install -qy build-essential gdb valgrind

# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME

# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
RUN apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
Expand Down

0 comments on commit d8fb273

Please sign in to comment.