Test gfortran #375
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: 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 |