From 3b1f0abfd8549b78a42dacf2f55fe5d8f5dbf3a0 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 1 Jul 2025 22:31:46 +0300 Subject: [PATCH] CI: test gdc Signed-off-by: Andrei Horodniceanu --- .github/workflows/ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19dbfbf..1f74fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,17 +30,36 @@ jobs: # old compiler tests - { os: ubuntu-22.04, dc: dmd-2.095.1, libdparse-version: min, build: debug, arch: x86_64 } - { os: ubuntu-22.04, dc: ldc-1.25.0, libdparse-version: min, build: debug, arch: x86_64 } + # gdc + - { os: ubuntu-24.04, dc: gdc-14, libdparse-version: min, build: debug, arch: x86_64 } + - { os: ubuntu-24.04, dc: gdc-14, libdparse-version: max, build: debug, arch: x86_64 } runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 with: submodules: recursive + - name: Setup D tools (gdc only) + if: ${{ startsWith(matrix.dc, 'gdc') }} + uses: dlang-community/setup-dlang@v2 + - name: Setup D uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.dc }} + - name: Set gdc specific environment variables + if: ${{ startsWith(matrix.dc, 'gdc') }} + run: | + tee -a ${GITHUB_ENV} <<<"DC=${DMD}" # need gdmd for -run + # Linking errors without -allinst + # No other easy way to pass this to dub, using DFLAGS in the + # environment disables unittests + cat <<-EOF | sudo tee -a /etc/dmd.conf + [Environment] + DFLAGS=-allinst + EOF + # Build - name: Build @@ -52,7 +71,6 @@ jobs: - name: Build DSymbol env: - DC: ${{matrix.dc}} LIBDPARSE_VERSION: ${{ matrix.libdparse-version }} run: | cd dsymbol @@ -60,7 +78,6 @@ jobs: - name: Test DSymbol env: - DC: ${{matrix.dc}} LIBDPARSE_VERSION: ${{ matrix.libdparse-version }} run: | cd dsymbol