Skip to content

Commit

Permalink
Add CI_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Dec 28, 2023
1 parent eeabb90 commit efc1ff4
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/CI_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: test
on: [push]
jobs:

Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
toolchain:
- {compiler: gcc}
- {compiler: intel-classic}
- {compiler: intel}
exclude:
- os: windows-latest
toolchain: {compiler: intel-classic}

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Run demo (Debug)
run: fpm example --demo --profile debug --compiler ${{ env.FC}}
env:
FC: ${{ steps.setup-fortran.outputs.fc }}

- name: Run demo (Release)
run: fpm run --example demo --profile release --compiler ${{ env.FC}}
env:
FC: ${{ steps.setup-fortran.outputs.fc }}

0 comments on commit efc1ff4

Please sign in to comment.