Skip to content

Commit cbd7555

Browse files
committed
Separate CI job steps for debug and release builds
1 parent 00443e0 commit cbd7555

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- os: ubuntu-latest
2828
STACK_CACHE: "/home/runner/.stack/"
2929
STACK_CACHE_VERSION: ""
30+
TEST_SCRIPT: ci/run_tests.sh
3031
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
3132
CHECK_VERSION_CMD: grep $(cat fpm_version)
3233
RELEASE_CMD: "cp -- fpm-v$(cat fpm_version)-linux-x86_64"
@@ -39,6 +40,7 @@ jobs:
3940
/Users/runner/.stack/snapshots
4041
/Users/runner/.stack/setup-exe-src
4142
STACK_CACHE_VERSION: "v2"
43+
TEST_SCRIPT: ci/run_tests.sh
4244
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
4345
CHECK_VERSION_CMD: grep $(cat fpm_version)
4446
RELEASE_CMD: "cp -- fpm-v$(cat fpm_version)-macos-x86_64"
@@ -51,6 +53,7 @@ jobs:
5153
C:\Users\runneradmin\AppData\Roaming\stack
5254
C:\Users\runneradmin\AppData\Local\Programs\stack
5355
STACK_CACHE_VERSION: "v2"
56+
TEST_SCRIPT: ci\run_tests.bat
5457
GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1]
5558
CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} }
5659
RELEASE_CMD: copy -- (-join("fpm-v",(Get-Content fpm_version),"-windows-x86_64.exe"))
@@ -119,17 +122,11 @@ jobs:
119122
cd bootstrap
120123
stack test
121124
122-
- name: Build and run Fortran fpm (Linux / macOS)
123-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
124-
run: |
125-
ci/run_tests.sh
126-
ci/run_tests.sh ${{ matrix.RELEASE_FLAGS }}
125+
- name: Build and test Fortran fpm
126+
run: ${{ matrix.TEST_SCRIPT }}
127127

128-
- name: Build and run Fortran fpm (Windows)
129-
if: contains(matrix.os, 'windows')
130-
run: |
131-
ci\run_tests.bat
132-
ci\run_tests.bat ${{ matrix.RELEASE_FLAGS }}
128+
- name: Build and test Fortran fpm (release version)
129+
run: ${{ matrix.TEST_SCRIPT }} ${{ matrix.RELEASE_FLAGS }}
133130

134131
# ----- Upload binaries if creating a release -----
135132
- name: Check that fpm --version matches release tag

0 commit comments

Comments
 (0)