From 2c56ad4aa10fda24e5d75ffea70cea4bd7ea9601 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 30 Jun 2025 11:21:39 +0300 Subject: [PATCH 1/3] CI: bump setup-dlang to v2 Since v2 setup-dlang makes DC and DMD be absolute paths. The testsuite doesn't fully cope with this so reset their values to only the basename (without extension on windows). Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 14 ++++++++++++-- .github/workflows/release.yml | 4 +--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad9b767e8b..6c552b7bff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install latest DMD - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 - name: Checkout uses: actions/checkout@v4 - name: Run tests @@ -100,10 +100,20 @@ jobs: # Compiler to test with - name: Prepare compiler - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.dc }} + - name: Set DC and DMD + shell: bash + run: | + for name in DC DMD; do + var=${!name} + var=$(basename "${var}") + var=${var%.exe} # strip the extension + tee -a ${GITHUB_ENV} <<<"${name}=${var}" + done + # Checkout the repository - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63353c8ca2..59dd83a366 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: ## Boileterplate (compiler/repo) - name: Install compiler - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 with: compiler: ldc-latest - name: Checkout repository @@ -48,7 +48,6 @@ jobs: if: runner.os == 'Linux' || runner.os == 'macOS' env: GITVER: ${{ github.event.release.tag_name }} - DMD: "ldmd2" ARCH_TRIPLE: ${{ matrix.arch }}-${{ runner.os == 'linux' && 'pc-linux' || 'apple-darwin' }} run: | ldc2 -run ./build.d -release -mtriple=${ARCH_TRIPLE} @@ -63,7 +62,6 @@ jobs: if: runner.os == 'Windows' env: GITVER: ${{ github.event.release.tag_name }} - DMD: "ldmd2" run: | ldc2 -run ./build.d -release -mtriple=${{ matrix.arch }}-pc-windows-msvc pushd bin From 62c601170ab4b3493725830a9f53c4828aaa873f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 30 Jun 2025 12:00:07 +0300 Subject: [PATCH 2/3] CI: ubuntu use new netcat-openbsd package name Since ubuntu-24.04 the netcat name is no longer supported and apt expects either netcat-openbsd or netcat-traditional. Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c552b7bff..82fa17731b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,7 +96,7 @@ jobs: - name: '[Linux] Install dependencies' if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat-openbsd # Compiler to test with - name: Prepare compiler From 6cd0aafd5b6d249f38706ebf5a6bd99581776074 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 30 Jun 2025 11:51:31 +0300 Subject: [PATCH 3/3] CI: add gdc build configurations, without tests Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82fa17731b..a7fdc15d75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,9 @@ jobs: - { dc: ldc-master, do_test: true } # Test on ARM64 - { os: macOS-14, dc: ldc-latest, do_test: true } + # Tests fail for gdc currently + - { os: ubuntu-24.04, dc: gdc-13, do_test: false } + - { os: ubuntu-24.04, dc: gdc-14, do_test: false } exclude: # Error with those versions: # ld: multiple errors: symbol count from symbol table and dynamic symbol table differ in [.../dub.o]; address=0x0 points to section(2) with no content in '[...]/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' @@ -103,8 +106,9 @@ jobs: uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.dc }} + dub: latest # gdc doesn't come with dub - - name: Set DC and DMD + - name: Set environment variables shell: bash run: | for name in DC DMD; do @@ -113,6 +117,12 @@ jobs: var=${var%.exe} # strip the extension tee -a ${GITHUB_ENV} <<<"${name}=${var}" done + # Pass -Wno-error with gdc, note that DFLAGS in the + # environment makes dub no longer pass -unittest on test + # builds so make sure tests are NOT run. + if [[ ${{ matrix.dc }} == gdc* ]]; then + tee -a ${GITHUB_ENV} <<<"DFLAGS=-Wno-error" + fi # Checkout the repository - name: Checkout