-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.79 KB
/
test_gfortran.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
name: Test gfortran
on:
# Trigger the workflow on push or pull request
push:
pull_request:
# Trigger the workflow at the end of every week
schedule:
- cron: '0 0 * * 0'
# Trigger the workflow when it is manually triggered
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-20.04, macos-latest, macos-11, macos-13, macos-14, windows-latest, windows-2019]
compiler: [gcc]
version: [13, 12, 11]
exclude:
- os: ubuntu-20.04
version: 12
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS
submodules: recursive
- name: Miscellaneous setup
shell: bash # Important; otherwise, the following statements do not work on Windows.
run: bash .github/scripts/misc_setup
- name: Make tools such as grep and git available on Windows
if: runner.os == 'Windows'
run: $env:Path += ";C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\ProgramData\Chocolatey\bin"
- name: Set up Fortran
if: ${{ matrix.os != 'macos-14' }}
uses: fortran-lang/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Set up Fortran for macOS 14 # As of 20240219, fortran-lang/setup-fortran does not support macos-14
if: ${{ matrix.os == 'macos-14' }}
run: |
sudo ln -sf $(which gfortran-${{ matrix.version }}) $(dirname $(which gfortran-${{ matrix.version }}))/gfortran
which gfortran && gfortran --version
- name: Conduct the test
run: cd test; make gtest