ci use presets #71
This file contains 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_cmake | |
env: | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
on: | |
push: | |
paths: | |
- "**.f90" | |
- "**.F90" | |
- "**.cmake" | |
- "**/CMakeLists.txt" | |
- ".github/workflows/ci_cmake.yml" | |
jobs: | |
gcc-new: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
gcc_version: [12, 13, 14] | |
include: | |
- os: macos-latest | |
gcc_version: 13 | |
env: | |
FC: gfortran-${{ matrix.gcc_version }} | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: install pytest | |
run: python -m pip install numpy scipy pytest | |
- uses: actions/checkout@v4 | |
- run: cmake --workflow --preset default | |
linux-flang: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
clang-version: [18] | |
env: | |
CC: clang-${{ matrix.clang-version }} | |
CXX: clang++-${{ matrix.clang-version }} | |
FC: flang-new | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install Flang | |
run: sudo apt install --no-install-recommends flang | |
- run: cmake --workflow --preset default | |
gcc-old: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
gcc_version: [9, 10, 11] | |
env: | |
FC: gfortran-${{ matrix.gcc_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cmake --workflow --preset default | |
windows: | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
env: | |
CMAKE_GENERATOR: "MinGW Makefiles" | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
mingw-w64-x86_64-gcc-fortran | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "D:/a/_temp/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: install pytest | |
run: python -m pip install numpy scipy pytest | |
- uses: actions/checkout@v4 | |
- run: cmake --workflow --preset default | |
- name: .exe for release | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: rpncalc.exe | |
path: build/rpncalc.exe |