fortrangoingonforty/fgof-watch / 3097e7b

Browse files

Add watch CI

Authored by espadonne
SHA
3097e7bffc830fb8c04f4f4f2520a2363847c8d4
Parents
7c88440
Tree
fe467b5

1 changed file

StatusFile+-
A .github/workflows/ci.yml 53 0
.github/workflows/ci.ymladded
@@ -0,0 +1,53 @@
1
+name: CI
2
+
3
+on:
4
+  push:
5
+    branches:
6
+      - trunk
7
+  pull_request:
8
+
9
+permissions:
10
+  contents: read
11
+
12
+jobs:
13
+  test:
14
+    name: Test (${{ matrix.os }})
15
+    runs-on: ${{ matrix.os }}
16
+    strategy:
17
+      fail-fast: false
18
+      matrix:
19
+        os:
20
+          - ubuntu-latest
21
+          - macos-latest
22
+
23
+    steps:
24
+      - name: Check out repository
25
+        uses: actions/checkout@v6
26
+
27
+      - name: Set up Fortran toolchain
28
+        uses: fortran-lang/setup-fortran@v1
29
+        with:
30
+          compiler: gcc
31
+          version: latest
32
+
33
+      - name: Set up fpm
34
+        if: runner.os != 'macOS'
35
+        uses: fortran-lang/setup-fpm@v9
36
+        with:
37
+          github-token: ${{ secrets.GITHUB_TOKEN }}
38
+          fpm-version: v0.13.0
39
+
40
+      - name: Install fpm with Homebrew
41
+        if: runner.os == 'macOS'
42
+        run: |
43
+          brew tap fortran-lang/homebrew-fortran
44
+          brew install fpm
45
+
46
+      - name: Show tool versions
47
+        run: |
48
+          fpm --version
49
+          "$FC" --version
50
+          "$CC" --version
51
+
52
+      - name: Run test suite
53
+        run: fpm test