Skip to content

Commit ee395fd

Browse files
committed
CI: bump setup-dlang to v2 in main
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 <a.horodniceanu@proton.me>
1 parent 4320d25 commit ee395fd

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Install latest DMD
31-
uses: dlang-community/setup-dlang@v1
31+
uses: dlang-community/setup-dlang@v2
3232
- name: Checkout
3333
uses: actions/checkout@v4
3434
- name: Run tests
@@ -100,10 +100,20 @@ jobs:
100100
101101
# Compiler to test with
102102
- name: Prepare compiler
103-
uses: dlang-community/setup-dlang@v1
103+
uses: dlang-community/setup-dlang@v2
104104
with:
105105
compiler: ${{ matrix.dc }}
106106

107+
- name: Set DC and DMD
108+
shell: bash
109+
run: |
110+
for name in DC DMD; do
111+
var=${!name}
112+
var=$(basename "${var}")
113+
var=${var%.exe} # strip the extension
114+
tee -a ${GITHUB_ENV} <<<"${name}=${var}"
115+
done
116+
107117
# Checkout the repository
108118
- name: Checkout
109119
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
## Boileterplate (compiler/repo)
3737
- name: Install compiler
38-
uses: dlang-community/setup-dlang@v1
38+
uses: dlang-community/setup-dlang@v2
3939
with:
4040
compiler: ldc-latest
4141
- name: Checkout repository
@@ -48,7 +48,6 @@ jobs:
4848
if: runner.os == 'Linux' || runner.os == 'macOS'
4949
env:
5050
GITVER: ${{ github.event.release.tag_name }}
51-
DMD: "ldmd2"
5251
ARCH_TRIPLE: ${{ matrix.arch }}-${{ runner.os == 'linux' && 'pc-linux' || 'apple-darwin' }}
5352
run: |
5453
ldc2 -run ./build.d -release -mtriple=${ARCH_TRIPLE}
@@ -63,7 +62,6 @@ jobs:
6362
if: runner.os == 'Windows'
6463
env:
6564
GITVER: ${{ github.event.release.tag_name }}
66-
DMD: "ldmd2"
6765
run: |
6866
ldc2 -run ./build.d -release -mtriple=${{ matrix.arch }}-pc-windows-msvc
6967
pushd bin

0 commit comments

Comments
 (0)