Skip to content

Commit 582054b

Browse files
committed
Only generate coverage for stable compiler
1 parent 4464d55 commit 582054b

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ jobs:
104104
key: ${{ runner.os }}-dub-${{ matrix.dc }}-${{ hashFiles('**/dub.sdl', '**/dub.json', '**/dub.selections.json') }}
105105
restore-keys: |
106106
${{ runner.os }}-dub-cache-${{ matrix.dc }}-
107-
- name: Build / test
107+
- name: Build / test (nightly compiler; no coverage)
108+
if: contains(matrix.dc, 'beta') || contains(matrix.dc, 'master')
109+
run: |
110+
dub test --arch=$ARCH --combined
111+
shell: bash
112+
- name: Build / test (stable compiler; with coverage)
113+
if: !(contains(matrix.dc, 'beta') || contains(matrix.dc, 'master'))
108114
run: |
109115
dub test --arch=$ARCH --build=unittest-cov
110116
dub test --arch=$ARCH --combined
@@ -159,10 +165,16 @@ jobs:
159165
key: ${{ runner.os }}-dub-cache-${{ matrix.arch }}-${{ matrix.dc }}-${{ hashFiles('**/dub.sdl', '**/dub.json', '**/dub.selections.json') }}
160166
restore-keys: |
161167
${{ runner.os }}-dub-cache-${{ matrix.arch }}-${{ matrix.dc }}-
162-
- name: Build / test
168+
- name: Build / test (nightly compiler; no coverage)
169+
if: contains(matrix.dc, 'beta') || contains(matrix.dc, 'master')
170+
run: |
171+
dub test --arch=$ARCH --combined
172+
shell: bash
173+
- name: Build / test (stable compiler; with coverage)
174+
if: !(contains(matrix.dc, 'beta') || contains(matrix.dc, 'master'))
163175
run: |
164176
dub test --arch=$ARCH --build=unittest-cov
165-
dub test --arch=$ARCH --combined
177+
dub test --arch=$ARCH --combined
166178
shell: bash
167179
- name: Upload coverage data
168180
uses: codecov/codecov-action@v5
@@ -212,13 +224,21 @@ jobs:
212224
${{ runner.os }}-dub-${{ matrix.dc }}-
213225
# Tests are split up to work around OOM errors -- no combined testing is done
214226
# as it's simply too big for the compiler to handle on Windows.
215-
- name: Build / test
227+
- name: Build / test (nightly compiler; no coverage)
228+
if: contains(matrix.dc, 'beta') || contains(matrix.dc, 'master')
216229
run: |
217230
dub test --arch=$ARCH --build=unittest-ci -c ci-bignum-test
218231
dub test --arch=$ARCH --build=unittest-ci -c ci-core-test
219232
dub test --arch=$ARCH --build=unittest-ci -c ci-ndslice-test
220233
dub test --arch=$ARCH --build=unittest-ci -c ci-test
221234
shell: bash
235+
- name: Build / test (stable compiler; with coverage)
236+
if: !(contains(matrix.dc, 'beta') || contains(matrix.dc, 'master'))
237+
run: |
238+
dub test --arch=$ARCH --build=unittest-cov-ci -c ci-bignum-test
239+
dub test --arch=$ARCH --build=unittest-cov-ci -c ci-core-test
240+
dub test --arch=$ARCH --build=unittest-cov-ci -c ci-ndslice-test
241+
dub test --arch=$ARCH --build=unittest-cov-ci -c ci-test
222242
- name: Upload coverage data
223243
uses: codecov/codecov-action@v5
224244
with:

dub.sdl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ buildType "unittest-cov" {
4242
versions "mir_bignum_test" "mir_bignum_test_llv" "mir_ndslice_test" "mir_test"
4343
dflags "-lowmem"
4444
}
45-
buildType "unittest-ci" {
45+
buildType "unittest-cov-ci" {
4646
buildOptions "unittests" "coverage" "debugMode" "debugInfo"
4747
dflags "-lowmem"
4848
}
49+
buildType "unittest-ci" {
50+
buildOptions "unittests" "debugMode" "debugInfo"
51+
dflags "-lowmem"
52+
}
4953
buildType "unittest-release" {
5054
buildOptions "unittests" "releaseMode" "optimize" "inline" "noBoundsCheck"
5155
versions "mir_bignum_test" "mir_ndslice_test" "mir_test"

0 commit comments

Comments
 (0)