update for fpm-0.9.0 #23
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: fpm | |
on: | |
push: | |
paths: | |
- "app/**.f90" | |
- "src/**.f90" | |
- "test/**.f90" | |
- "fpm.toml" | |
pull_request: | |
braches: | |
- main | |
paths: | |
- "app/**.f90" | |
- "src/**.f90" | |
- "test/**.f90" | |
- "fpm.toml" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
gcc_v: [10] # Version of GFortran we want to use. | |
include: | |
- os: ubuntu-latest | |
os-arch: linux-x86_64 | |
- os: macos-latest | |
os-arch: macos-x86_64 | |
env: | |
FC: gfortran | |
GCC_V: ${{ matrix.gcc_v }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install GFortran macOS | |
if: contains(matrix.os, 'macos') | |
run: | | |
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran | |
which gfortran-${GCC_V} | |
which gfortran | |
- name: Install GFortran Linux | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ | |
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} | |
- name: Install fpm | |
uses: fortran-lang/setup-fpm@v3 | |
with: | |
fpm-version: 'v0.4.0' | |
- name: Build & Test ⚔ | |
run: | | |
gfortran --version | |
fpm build |