ci: Ninja now pre-installed on GA runners #737
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
env: | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
CTEST_NO_TESTS_ACTION: error | |
CTEST_PARALLEL_LEVEL: 0 | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
CMAKE_INSTALL_PREFIX: ~/libs | |
CMAKE_PREFIX_PATH: ~/libs | |
on: | |
push: | |
paths: | |
- "**.c" | |
- "**.cpp" | |
- "**.f90" | |
- "**.F90" | |
- "**/CMakeLists.txt" | |
- "**.cmake" | |
- ".github/workflows/**" | |
- "!memcheck.cmake" | |
- "!coverage.cmake" | |
workflow_dispatch: | |
# avoid wasted runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
gcc-new: | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
shared: [false] | |
gcc: [12, 13, 14] | |
include: | |
- os: ubuntu-24.04 | |
shared: true | |
gcc: 14 | |
- os: macos-latest | |
shared: true | |
gcc: 14 | |
- os: macos-latest | |
shared: false | |
gcc: 14 | |
runs-on: ${{ matrix.os }} | |
env: | |
FC: gfortran-${{ matrix.gcc }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: GCC (Linux) | |
if: runner.os == 'Linux' | |
run: echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV | |
- uses: ./.github/workflows/composite-pkg | |
- uses: ./.github/workflows/composite-unix | |
gcc-old: | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
shared: [false] | |
gcc: [9, 10, 11] | |
runs-on: ubuntu-22.04 | |
env: | |
CC: gcc-${{ matrix.gcc }} | |
FC: gfortran-${{ matrix.gcc }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/composite-pkg | |
- uses: ./.github/workflows/composite-unix | |
linux-flang: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
llvm-version: [20] | |
env: | |
CC: clang-${{ matrix.llvm-version }} | |
CXX: clang++-${{ matrix.llvm-version }} | |
FC: flang-${{ matrix.llvm-version }} | |
steps: | |
- name: Apt LLVM | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh ${{ matrix.llvm-version }} | |
sudo apt-get update | |
- name: install Flang | |
run: sudo apt install --no-install-recommends ninja-build clang-${{ matrix.llvm-version }} flang-${{ matrix.llvm-version }} | |
- uses: actions/checkout@v4 | |
- name: configure Cmake | |
run: cmake --preset multi -Dbuild_zlib:BOOL=true | |
- name: Build / test Debug | |
run: cmake --workflow --preset debug | |
- name: Build / test Release | |
run: cmake --workflow --preset release | |
valgrind-memory: | |
runs-on: ubuntu-latest | |
needs: gcc-new | |
timeout-minutes: 10 | |
steps: | |
- name: install valgrind | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends valgrind libhdf5-dev | |
- uses: actions/checkout@v4 | |
- run: ctest -Dexclude_label=python -S memcheck.cmake -VV | |
# issue with python loading writer.inc | |
linux-coverage: | |
if: false | |
needs: gcc-new | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: install hdf5 | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends libhdf5-dev | |
- name: install Gcovr | |
run: pip install gcovr | |
- run: cmake --preset coverage | |
- run: cmake --build --parallel --preset coverage | |
- name: Code coverage | |
run: cmake --build --parallel --preset run-coverage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report-html | |
path: build-coverage/coverage/ | |
cmake-older: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cmake_version: ["3.20.6"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prereqs | |
run: | | |
sudo apt-get update | |
sudo apt install --no-install-recommends libhdf5-dev | |
- uses: ./.github/workflows/composite-cmake | |
- name: configure | |
run: $CMAKE -Bbuild -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/build/local | |
- name: build | |
run: $CMAKE --build build | |
- name: test | |
run: $CTEST --test-dir build | |
- name: install package | |
run: $CMAKE --install build |