Skip to content

Commit 8afad16

Browse files
authored
Update test-fortran-macos.yml
1 parent a32db34 commit 8afad16

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

.github/workflows/test-fortran-macos.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,29 @@ on: [push, pull_request]
44

55
jobs:
66
fast_build_release:
7-
runs-on: ${{ matrix.os }}
7+
runs-on: macos-12
88
strategy:
9-
matrix:
10-
os: [macos-latest]
9+
toolchain:
10+
- {compiler: gcc, version: 13}
1111

1212
steps:
1313
- uses: actions/checkout@v4
1414

15-
- name: Install GFortran
16-
run: brew install gfortran gcc
15+
- uses: fortran-lang/setup-fortran@v1
16+
id: setup-fortran
17+
with:
18+
compiler: gcc
19+
version: 13
20+
21+
- run: |
22+
${{ env.FC }} ... # environment vars FC, CC, and CXX are set
23+
${{ steps.setup-fortran.outputs.fc }} ... # outputs work too
24+
25+
# - name: Install GFortran
26+
# run: brew install gfortran gcc
1727

1828
- name: Create Build Environment
1929
run: cmake -E make_directory ${{runner.workspace}}/build
20-
21-
- name: Symlink gfortran (macOS)
22-
run: |
23-
# make sure gfortran is available
24-
# https://github.com/actions/virtual-environments/issues/2524
25-
# https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
26-
gfortran-11 --version
27-
gcc-11 --version
28-
whereis gcc-11
29-
gcc --version
30-
ls /usr/local/Cellar/gcc@11/*/lib/gcc/11
31-
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
32-
sudo mkdir /usr/local/gfortran
33-
sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
34-
gfortran --version
3530

3631
- name: Configure CMake
3732
shell: bash

0 commit comments

Comments
 (0)