Skip to content

Commit 98448a3

Browse files
committed
parametrize versions
1 parent 542dd99 commit 98448a3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/fpm-deployment.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: fpm-deployment
22

33
on: [push, pull_request]
44

5+
env:
6+
FPM_VERSION: 'v0.12.0' # FPM version
7+
SETUP_FPM_VERSION: 'v8' # setup-fpm action version
8+
GNU_VERSION: '13' # GNU compiler toolchain major version
9+
510
jobs:
611
deploy:
712
name: Run tests and deploys the fpm branches
@@ -11,7 +16,7 @@ jobs:
1116
matrix:
1217
include:
1318
- os: ubuntu-latest
14-
toolchain: {compiler: gcc, version: 13}
19+
toolchain: {compiler: gcc, version: ${{ env.GNU_VERSION }} }
1520

1621
steps:
1722
- name: Checkout code
@@ -32,9 +37,9 @@ jobs:
3237
version: ${{ matrix.toolchain.version }}
3338

3439
- name: Setup Fortran Package Manager
35-
uses: fortran-lang/setup-fpm@v8
40+
uses: fortran-lang/setup-fpm@${{ env.SETUP_FPM_VERSION }}
3641
with:
37-
fpm-version: 'v0.12.0'
42+
fpm-version: ${{ env.FPM_VERSION }}
3843

3944
- run: | # Just for deployment: create stdlib-fpm folder
4045
python config/fypp_deployment.py --deploy_stdlib_fpm
@@ -71,7 +76,7 @@ jobs:
7176
matrix:
7277
include:
7378
- os: ubuntu-latest
74-
toolchain: {compiler: gcc, version: 13}
79+
toolchain: {compiler: gcc, version: ${{ env.GNU_VERSION }} }
7580

7681
steps:
7782
- name: Checkout code
@@ -86,9 +91,9 @@ jobs:
8691
version: ${{ matrix.toolchain.version }}
8792

8893
- name: Setup Fortran Package Manager
89-
uses: fortran-lang/setup-fpm@v8
94+
uses: fortran-lang/setup-fpm@${{ env.SETUP_FPM_VERSION }}
9095
with:
91-
fpm-version: 'v0.12.0'
96+
fpm-version: ${{ env.FPM_VERSION }}
9297

9398
- name: Prepare for code coverage
9499
if: contains( matrix.os, 'ubuntu')

0 commit comments

Comments
 (0)