Skip to content

Commit 04ad7cd

Browse files
committed
CI: test gdc
Use ${DMD} -run instead of rdmd since gdc doesn't come with rdmd Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
1 parent 61c86e9 commit 04ad7cd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/d.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,31 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
dc: [dmd, ldc]
23+
include:
24+
- { os: ubuntu-latest, dc: gdc-14 }
2325
runs-on: ${{ matrix.os }}
2426

2527
steps:
2628
- uses: actions/checkout@v4
2729
- uses: dlang-community/setup-dlang@v2
2830
with:
2931
compiler: ${{ matrix.dc }}
32+
dub: latest
33+
34+
- name: Setup gdc specific environment
35+
if: ${{ startsWith(matrix.dc, 'gdc') }}
36+
run: |
37+
tee -a ${GITHUB_ENV} <<<"DC=${DMD}"
38+
# Linking errors without -allinst
39+
# No other easy way to pass this to dub, using DFLAGS in the
40+
# environment disables unittests
41+
cat <<-EOF | sudo tee -a /etc/dmd.conf
42+
[Environment]
43+
DFLAGS=-allinst
44+
EOF
3045
3146
- name: 'Build & Test'
47+
shell: bash
3248
run: |
3349
# Build the project, with its main file included, without unittests
3450
dub build
@@ -37,4 +53,4 @@ jobs:
3753
# See https://dub.pm/package-format-json.html#configurations
3854
dub test
3955
# Run tests
40-
cd tests && rdmd test
56+
cd tests && "${DMD}" -run test.d

0 commit comments

Comments
 (0)