Skip to content

Commit

Permalink
Update test_gfortran.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang authored Feb 19, 2024
1 parent cc4a539 commit 50179e0
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/test_gfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,25 @@ jobs:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS
submodules: recursive

- name: Setup Fortran
id: setup_fortran
# Use the action defined at github.com/awvwgk/setup-fortran@main to setup Fortran
uses: awvwgk/setup-fortran@main
- 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: Check Fortran compiler
- 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: |
${{ env.FC }} --version
${{ env.CC }} --version
shell: bash
env:
FC: ${{ steps.setup_fortran.outputs.fc }}
sudo ln -sf $(which gfortran-${{ matrix.version }}) $(dirname $(which gfortran-${{ matrix.version }}))/gfortran
which gfortran && gfortran --version
CC: ${{ steps.setup_fortran.outputs.cc }}
- name: Conduct the test
Expand Down

0 comments on commit 50179e0

Please sign in to comment.