88 types : [ created ]
99
1010env :
11- REFERENCE_CONFIG : ' Ubuntu gcc14' # configuration used for coverage etc
11+ REFERENCE_CONFIG : ' gcc14' # configuration used for coverage etc
1212
1313jobs :
1414 build :
1515 name : " ${{ matrix.configurations.name }} | ${{ matrix.cmake-build-type }}"
1616 environment : configure coverage
17- runs-on : ${{ matrix.configurations.os }}
17+ runs-on : " ubuntu-latest"
18+ container : " ghcr.io/fair-acc/gr4-build-container:latest"
1819 strategy :
1920 fail-fast : false
2021 matrix :
2122 configurations :
22- - name : Ubuntu gcc14
23- os : ubuntu-24.04
23+ - name : gcc14
2424 compiler : gcc14
25- - name : Ubuntu clang18
26- os : ubuntu-24.04
27- compiler : clang18
28- - name : ubuntu-22.04 emscripten
29- os : ubuntu-24.04
25+ cc : gcc-14
26+ cxx : g++-14
27+ - name : clang20
28+ compiler : clang20
29+ cc : clang-20
30+ cxx : clang++-20
31+ - name : emscripten
3032 compiler : emscripten
31- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
3233 cmake-build-type : [ Release, Debug ]
3334 env :
3435 BUILD_WRAPPER_OUT_DIR : build_wrapper_output_directory
36+ services :
37+ keycloak :
38+ image : quay.io/keycloak/keycloak:26.0.5
39+ env :
40+ KEYCLOAK_ADMIN : admin
41+ KEYCLOAK_ADMIN_PASSWORD : admin
42+ options : >-
43+ --health-cmd "curl -fsS http://localhost:8080/ || exit 1"
44+ --health-interval 5s
45+ --health-timeout 3s
46+ --health-retries 60
3547
3648 steps :
37- - uses : actions/checkout@v6
49+ - uses : actions/checkout@v4
3850 with :
3951 fetch-depth : 100
4052
@@ -46,56 +58,26 @@ jobs:
4658 path : ${{runner.workspace}}/build/_deps
4759 key : ${{ runner.os }}-${{ matrix.configurations.compiler }}-${{ matrix.cmake-build-type }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Dependencies.cmake') }}
4860
49- - name : Install gcovr
50- shell : bash
51- if : matrix.configurations.name == env.REFERENCE_CONFIG && matrix.cmake-build-type == 'Debug'
52- run : sudo apt-get install -y gcovr
53-
54- - name : Install gcc-14
55- if : matrix.configurations.compiler == 'gcc14'
56- run : |
57- sudo apt-get install -y gcc-14 g++-14
58- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 110 --slave /usr/bin/g++ g++ /usr/bin/g++-14 --slave /usr/bin/gcov gcov /usr/bin/gcov-14
59-
60- - name : Install clang-18
61- if : matrix.configurations.compiler == 'clang18'
62- run : |
63- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
64- sudo apt update
65- sudo apt upgrade -y
66- sudo apt install -y clang-18 libc++-18-dev libc++abi-18-dev
67- sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 110
68- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 110
69-
70- - name : Install emscripten
71- if : matrix.configurations.compiler == 'emscripten'
72- run : |
73- cd
74- git clone https://github.com/emscripten-core/emsdk.git
75- cd emsdk
76- # Download and install emscripten.
77- ./emsdk install 3.1.59
78- # Make "active" for the current user. (writes .emscripten file)
79- ./emsdk activate 3.1.59
80-
8161 - name : Install sonar-scanner and build-wrapper
8262 if : matrix.configurations.name == env.REFERENCE_CONFIG && matrix.cmake-build-type == 'Debug'
8363 uses : SonarSource/sonarqube-scan-action/install-build-wrapper@v7
8464
8565 - name : Configure CMake
8666 if : matrix.configurations.compiler != 'emscripten'
87- # Use a bash shell, so we can use the same syntax for environment variable access regardless of the host operating system
8867 shell : bash
68+ env :
69+ CC : " ${{ matrix.configurations.cc }}"
70+ CXX : " ${{ matrix.configurations.cxx }}"
71+ CMAKE_EXPORT_COMPILE_COMMANDS : " ON"
8972 run : cmake -S . -B ../build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DOPENCMW_ENABLE_COVERAGE=${{ matrix.configurations.name == env.REFERENCE_CONFIG && matrix.cmake-build-type == 'Debug' }}
9073
9174 - name : Configure CMake Emscripten
9275 if : matrix.configurations.compiler == 'emscripten'
93- # Use a bash shell, so we can use the same syntax for environment variable access regardless of the host operating system
9476 shell : bash
9577 run : |
9678 export SYSTEM_NODE=`which node` # use system node instead of old version distributed with emsdk for threading support
97- source ~/emsdk /emsdk_env.sh
98- emcmake cmake -S . -B ../build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DENABLE_TESTING=ON - DCMAKE_CROSSCOMPILING_EMULATOR=${SYSTEM_NODE}
79+ source $EMSDK_HOME /emsdk_env.sh
80+ emcmake cmake -S . -B ../build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DCMAKE_CROSSCOMPILING_EMULATOR=${SYSTEM_NODE}
9981
10082 - name : Build
10183 if : matrix.configurations.name != env.REFERENCE_CONFIG || matrix.cmake-build-type != 'Debug'
@@ -107,9 +89,14 @@ jobs:
10789 shell : bash
10890 run : build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build ../build --config ${{ matrix.cmake-build-type }}
10991
110- - name : Run Keycloak Docker
92+ - name : Setup Keycloak
93+ if : matrix.configurations.compiler != 'emscripten'
11194 shell : bash
112- run : docker run -p 8090:8080 -d -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:26.0.5 start-dev && src/client/test/setup-keycloak.sh
95+ env :
96+ KEYCLOAK_URL : http://keycloak:8080
97+ KEYCLOAK_REDIRECT_URI : http://localhost:8091
98+ KEYCLOAK_ADMIN_PASSWORD : admin
99+ run : src/client/test/setup-keycloak.sh
113100
114101 - name : Run tests
115102 if : matrix.configurations.name != env.REFERENCE_CONFIG || matrix.cmake-build-type != 'Debug'
0 commit comments