cache install prefix #36
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 | |
env: | |
CMAKE_BUILD_TYPE: Release | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
CTEST_NO_TESTS_ACTION: error | |
on: | |
push: | |
paths: | |
- "**/CMakeLists.txt" | |
- "**.cmake" | |
- "**.f90" | |
- "**.py" | |
- ".github/workflows/ci.yml" | |
jobs: | |
core: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
include: | |
- os: macos-latest | |
python-version: "3.10" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: prereqs for f2py (macOS) | |
if: runner.os == 'macOS' | |
run: brew reinstall gcc | |
- run: pip install .[tests,lint] | |
- run: flake8 | |
- run: mypy | |
- name: Build Lowtran, check that it can be imported by Python | |
run: python -c "import lowtran; lowtran.check()" | |
- run: pytest | |
- run: cmake --workflow --preset default | |
windows: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
mingw-w64-x86_64-ninja | |
mingw-w64-x86_64-gcc-fortran | |
# Github actions Gfortran in default image is messed up. | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: actions/checkout@v3 | |
- run: python -m pip install .[tests,lint] | |
- run: flake8 | |
- run: mypy | |
- name: Build Lowtran, check that it can be imported by Python | |
run: python -c "import lowtran; lowtran.check()" | |
- run: pytest -v | |
- run: cmake -B build | |
env: | |
CMAKE_GENERATOR: "MinGW Makefiles" | |
- run: cmake --build build | |
- run: ctest --test-dir build --preset default |