Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: CMake: add GCC-14. Use Ubuntu 24.04 as suitable #180

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 95 additions & 21 deletions .github/workflows/ci_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,29 @@ on:

env:
CTEST_NO_TESTS_ACTION: "error"
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 0

jobs:

linux:
runs-on: ubuntu-22.04
linux-new:
runs-on: ubuntu-24.04
name: CMake build on Linux
timeout-minutes: 60

strategy:
matrix:
cc: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13]
cc: [gcc-12, gcc-13, gcc-14]
shared: [false]
mpi: [true]
include:
- shared: true
cc: gcc
mpi: true
- cc: clang-14
mpi: false
shared: false
- cc: clang-15
mpi: false
shared: false
# Clang is ABI-incompatible with the libmpich on the CI Ubuntu images.
- cc: clang-17
mpi: true
- cc: clang-18
mpi: true

env:
CC: ${{ matrix.cc }}
Expand Down Expand Up @@ -72,7 +71,7 @@ jobs:
--debug-find --fresh

- name: CMake build
run: cmake --build --preset default --parallel
run: cmake --build --preset default

- name: CMake Test
run: ctest --preset default
Expand All @@ -84,7 +83,7 @@ jobs:
run: cmake -B example/build -S example -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }}

- name: CMake build examples
run: cmake --build example/build --parallel
run: cmake --build example/build

- name: Create package
if: github.event.action == 'published'
Expand All @@ -106,9 +105,86 @@ jobs:
./build/CMakeFiles/CMakeConfigureLog.yaml
./build/Testing/Temporary/LastTest.log

linux-valgrind:
needs: linux

linux-old:
runs-on: ubuntu-22.04
name: CMake build on Linux
timeout-minutes: 60

strategy:
matrix:
cc: [gcc-9, gcc-10, gcc-11]
shared: [false]
mpi: [true]

env:
CC: ${{ matrix.cc }}

steps:
- uses: actions/checkout@v4
name: Checkout source code

- name: Install system dependencies
if: ${{ matrix.mpi }}
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends \
libmpich-dev mpich

- name: CMake configure
run: >-
cmake --preset default
-Dmpi:BOOL=${{ matrix.mpi }}
--install-prefix=${{ runner.temp }}
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}

- name: CMake print debug find
if: failure()
run: >-
cmake --preset default
-Dmpi:BOOL=${{ matrix.mpi }}
--install-prefix=${{ runner.temp }}
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
--debug-find --fresh

- name: CMake build
run: cmake --build --preset default

- name: CMake Test
run: ctest --preset default

- name: CMake install (for examples)
run: cmake --install build

- name: CMake configure examples
run: cmake -B example/build -S example -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }}

- name: CMake build examples
run: cmake --build example/build

- name: Create package
if: github.event.action == 'published'
run: cpack --config build/CPackConfig.cmake

- name: Upload package
if: github.event.action == 'published'
uses: actions/upload-artifact@v4
with:
name: linux-binary-archive-${{ matrix.cc }}-${{ matrix.mpi }}-shared-${{ matrix.shared }}
path: build/package

- name: Upload log files
if: always()
uses: actions/upload-artifact@v4
with:
name: linux_cmake_log-${{ matrix.cc }}-${{ matrix.mpi }}-shared-${{ matrix.shared }}
path: |
./build/CMakeFiles/CMakeConfigureLog.yaml
./build/Testing/Temporary/LastTest.log

linux-valgrind:
needs: linux-new
runs-on: ubuntu-24.04
name: CMake with Valgrind
timeout-minutes: 60

Expand Down Expand Up @@ -136,7 +212,7 @@ jobs:
run: cmake --preset default -Dmpi:BOOL=${{ matrix.mpi }} --install-prefix=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }} -DTEST_WITH_VALGRIND:BOOL=${{ matrix.valgrind }}

- name: CMake build
run: cmake --build --preset default --parallel
run: cmake --build --preset default

- name: CMake Test
run: ctest --preset default
Expand All @@ -151,8 +227,6 @@ jobs:
./build/Testing/Temporary/LastTest.log

mac:
# macos-14 is to use Apple Silicon hardware as most Apple users nowadays would have
# https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
runs-on: macos-14
name: CMake build on MacOS
timeout-minutes: 60
Expand Down Expand Up @@ -180,7 +254,7 @@ jobs:
run: cmake --preset default --install-prefix=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}

- name: CMake build
run: cmake --build --preset default --parallel
run: cmake --build --preset default

- name: CMake Test
run: ctest --preset default
Expand All @@ -192,7 +266,7 @@ jobs:
run: cmake -B example/build -S example -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }}

- name: CMake build examples
run: cmake --build example/build --parallel
run: cmake --build example/build

- name: Create package
if: github.event.action == 'published'
Expand Down Expand Up @@ -235,7 +309,7 @@ jobs:
run: cmake --preset default -Dmpi:BOOL=no --install-prefix=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}

- name: CMake build
run: cmake --build --preset default --parallel
run: cmake --build --preset default

- name: CMake Test
run: ctest --preset default
Expand All @@ -247,7 +321,7 @@ jobs:
run: cmake -B example/build -S example -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }}

- name: CMake build examples
run: cmake --build example/build --parallel
run: cmake --build example/build

- name: Create package
if: github.event.action == 'published'
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ci_darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ jobs:
steps:
- run: echo "This job is running on a ${{ runner.os }} server hosted by GitHub"

- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout source code

- name: Install system dependencies
run: brew install open-mpi ninja automake
run: brew install open-mpi libtool automake

- name: Run bootstrap script
run: ./bootstrap

- name: Make check without MPI, with debug
shell: bash
run: |
DIR="checkdebug" && mkdir -p "$DIR" && cd "$DIR"
../configure --enable-debug \
Expand All @@ -41,7 +40,6 @@ jobs:
make -j check V=0

- name: Make check with MPI and debug
shell: bash
run: |
DIR="checkMPIdebug" && mkdir -p "$DIR" && cd "$DIR"
../configure --enable-mpi --enable-debug \
Expand All @@ -50,7 +48,6 @@ jobs:
make -j check V=0

- name: Make check with MPI, debug and C++ compiler
shell: bash
run: |
DIR="checkMPIdebugCXX" && mkdir -p "$DIR" && cd "$DIR"
../configure --enable-mpi --enable-debug CC=mpicxx \
Expand All @@ -60,7 +57,7 @@ jobs:

- name: Upload log files
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: darwin_log
path: |
Expand Down
Loading