diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ed6d8470..ed1796a0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -4,15 +4,18 @@ on: [push, pull_request] # We define multiple jobs that test compatibility of the FIRESTARTER code against different compilers. # On linux: -# FIRESTARTER_HIP version 6.2 against the hipcc compiler -# FIRESTARTER_ONEAPI versions 2023.2.0 and 2024.0 against icx and icpx -# FIRESTARTER_CUDA with cuda versions 8.0, 11.0 and NVHPC-22.5 against clang++-10 -# FIRESTARTER against g++-7, g++-8, g++-9, g++-10, clang++-8, clang++-9, clang++-10 +# FIRESTARTER_HIP version 6.2 against the hipcc compiler on ubuntu24.04 +# FIRESTARTER_ONEAPI versions 2023.2.0 and 2024.0 against icx and icpx compiler on ubuntu24.04 +# FIRESTARTER_CUDA with cuda versions 8.0, 11.0 and NVHPC-22.5 against the default compiler on ubuntu24.04 +# FIRESTARTER against +# ubuntu 20.04 gcc-7 and clang-9 +# ubuntu 24.04 gcc-14 and clang-19 +# default compilers on ubuntu-20.04, ubuntu-22.04 and ubuntu-24.04 # On Windows: # FIRESTARTER against windows-2019 MSVC and mingw # FIRESTARTER_CUDA against windows-2019 MSVC # On MacOS: -# FIRESTARTER against XCode on MacOS 12 and 13 +# FIRESTARTER against XCode on MacOS 13 jobs: @@ -20,7 +23,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] HIP: ['6.2'] runs-on: ${{ matrix.os }} @@ -91,7 +94,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04] + os: [ubuntu-24.04] ONEAPI: ['2023.2.0', '2024.0'] runs-on: ${{ matrix.os }} @@ -163,7 +166,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04] + os: [ubuntu-24.04] CUDA: ['8.0', '11.0', 'NVHPC-22.5'] runs-on: ${{ matrix.os }} @@ -179,9 +182,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Install clang++-10 - run: | - sudo apt install clang-10 - name: Install CUDA runtime run: | case ${{ matrix.CUDA }} in @@ -211,9 +211,6 @@ jobs: run: | mkdir build - name: Run CMake configure (CUDA) - env: - CC: 'clang-10' - CXX: 'clang++-10' if: matrix.CUDA != 'NVHPC-22.5' run: | export CPATH=${CUDA_ROOT}/include:${CPATH} @@ -228,9 +225,6 @@ jobs: cd build cmake -DFIRESTARTER_BUILD_TYPE="FIRESTARTER_CUDA" -DCMAKE_EXE_LINKER_FLAGS="-L${CUDA_ROOT}/lib64/stubs/" .. - name: Run CMake configure (CUDA with NVHPC) - env: - CC: 'clang-10' - CXX: 'clang++-10' if: matrix.CUDA == 'NVHPC-22.5' run: | NVARCH=`uname -s`_`uname -m`; export NVARCH @@ -268,32 +262,25 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04] - compiler: [g++-7, g++-8, g++-9, g++-10, clang++-8, clang++-9, clang++-10] + include: + # Oldest supported compiler on older Ubuntu + - { os: ubuntu-20.04, compiler: gcc-7, cxxcompiler: g++-7 } + - { os: ubuntu-20.04, compiler: clang-9, cxxcompiler: clang++-9 } + # Latest compiler on latest Ubuntu + - { os: ubuntu-24.04, compiler: gcc-14, cxxcompiler: g++-14 } + - { os: ubuntu-24.04, compiler: clang-19, cxxcompiler: clang++-19 } + # Default compilers on all ubuntu + - { os: ubuntu-20.04, compiler: default } + - { os: ubuntu-22.04, compiler: default } + - { os: ubuntu-24.04, compiler: default } runs-on: ${{ matrix.os }} steps: - - name: Install g++-7 (if needed) - if: matrix.compiler == 'g++-7' - run: | - sudo apt install g++-7 - - name: Install g++-8 (if needed) - if: matrix.compiler == 'g++-8' - run: | - sudo apt install g++-8 - - name: Install clang++-8 (if needed) - if: matrix.compiler == 'clang++-8' - run: | - sudo apt install clang-8 - - name: Install clang++-9 (if needed) - if: matrix.compiler == 'clang++-9' + - name: Install compiler (if needed) + if: matrix.compiler != 'default' run: | - sudo apt install clang-9 - - name: Install clang++-10 (if needed) - if: matrix.compiler == 'clang++-10' - run: | - sudo apt install clang-10 + sudo apt install ${{ matrix.compiler }} - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -305,10 +292,16 @@ jobs: - name: Create build directory run: | mkdir build - - name: Run CMake configure (default) + - name: Run CMake configure + if: matrix.compiler != 'default' env: - # We do not set the CC flag as it is not used in the FIRESTARTER build - CXX: ${{ matrix.compiler }} + CC: ${{ matrix.compiler }} + CXX: ${{ matrix.cxxcompiler }} + run: | + cd build + cmake .. + - name: Run CMake configure + if: matrix.compiler == 'default' run: | cd build cmake .. @@ -323,35 +316,15 @@ jobs: - name: Test FIRESTARTER (default) run: ./build/src/FIRESTARTER -t 1 - uses: actions/upload-artifact@v4 - if: matrix.compiler == 'clang++-10' && ( github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request' ) + if: matrix.compiler == 'clang-19' && ( github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request' ) with: name: FIRESTARTER-linux retention-days: 1 path: build/src/FIRESTARTER - - name: UnInstall g++-7 (if needed) - if: matrix.compiler == 'g++-7' - run: | - sudo apt remove g++-7 - sudo apt autoremove - - name: UnInstall g++-8 (if needed) - if: matrix.compiler == 'g++-8' - run: | - sudo apt remove g++-8 - sudo apt autoremove - - name: UnInstall clang++-8 (if needed) - if: matrix.compiler == 'clang++-8' + - name: Uninstall compiler (if needed) + if: matrix.compiler != 'default' run: | - sudo apt remove clang-8 - sudo apt autoremove - - name: UnInstall clang++-9 (if needed) - if: matrix.compiler == 'clang++-9' - run: | - sudo apt remove clang-9 - sudo apt autoremove - - name: UnInstall clang++-10 (if needed) - if: matrix.compiler == 'clang++-10' - run: | - sudo apt remove clang-10 + sudo apt remove ${{ matrix.compiler }} sudo apt autoremove