-
-
Notifications
You must be signed in to change notification settings - Fork 42
88 lines (64 loc) · 1.8 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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-24.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: "3.10"
runs-on: ${{ matrix.os }}
env:
FC: gfortran-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- 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-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@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
- 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