ci: upload log on failure rather than print #235
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: | |
CTEST_NO_TESTS_ACTION: error | |
CTEST_PARALLEL_LEVEL: 0 | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
on: | |
push: | |
paths: | |
- "**.f90" | |
- "**.F90" | |
- "**.c" | |
- "**.cpp" | |
- "**.h" | |
- "**.cmake" | |
- "**/CMakeLists.txt" | |
- ".github/workflows/ci.yml" | |
jobs: | |
linux-gcc: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
gcc-version: [12, 13, 14] | |
env: | |
CC: gcc-${{ matrix.gcc-version }} | |
CXX: g++-${{ matrix.gcc-version }} | |
FC: gfortran-${{ matrix.gcc-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/composite-unix | |
linux-gcc-old: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
gcc-version: [9, 10, 11] | |
env: | |
CC: gcc-${{ matrix.gcc-version }} | |
CXX: g++-${{ matrix.gcc-version }} | |
FC: gfortran-${{ matrix.gcc-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/composite-unix | |
valgrind-memory: | |
runs-on: ubuntu-latest | |
needs: linux-gcc | |
timeout-minutes: 10 | |
steps: | |
- name: install valgrind | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends valgrind | |
- uses: actions/checkout@v4 | |
- run: ctest -S memcheck.cmake -VV -E "sleep|string_array|string_view|binding_derived" | |
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: | |
- uses: actions/checkout@v4 | |
- 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 clang-${{ matrix.llvm-version }} flang-${{ matrix.llvm-version }} | |
- uses: ./.github/workflows/composite-unix | |
mac: | |
# need Apple Silicon for exception handling try_compile detection to work | |
runs-on: macos-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
compiler: [{cpp: clang++, c: clang, fc: flang-new }, | |
{cpp: g++-14, c: gcc-14, fc: gfortran-14 }] | |
env: | |
FC: ${{ matrix.compiler.fc }} | |
CC: ${{ matrix.compiler.c }} | |
CXX: ${{ matrix.compiler.cpp }} | |
steps: | |
- name: install Flang | |
if: ${{ matrix.compiler.fc == 'flang-new' }} | |
run: brew install flang | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/composite-unix | |
windows: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: mingw-w64-x86_64-gcc-fortran | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- uses: actions/checkout@v4 | |
- run: cmake --workflow --preset default | |
env: | |
CMAKE_GENERATOR: "MinGW Makefiles" | |
- name: upload CMakeConfigureLog.yaml | |
if: failure() && hashFiles('build/CMakeFiles/CMakeConfigureLog.yaml') != '' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ runner.os }}-CMakeConfigureLog.yaml | |
path: build/CMakeFiles/CMakeConfigureLog.yaml |