From 22c1f8fffdec2abaeda5f4d16aaed684ddd4abbb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 31 May 2024 19:36:08 +0300 Subject: [PATCH 1/2] test/issue2012-dc-env/app.d: check only basename of $DC Signed-off-by: Andrei Horodniceanu --- test/issue2012-dc-env/app.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/issue2012-dc-env/app.d b/test/issue2012-dc-env/app.d index 4b1f4d106..25299f0ef 100644 --- a/test/issue2012-dc-env/app.d +++ b/test/issue2012-dc-env/app.d @@ -4,6 +4,8 @@ +/ import std.format; +import std.path : baseName; +import std.algorithm : canFind; void main(string[] args) { @@ -14,5 +16,6 @@ void main(string[] args) version (GNU) immutable expected = "gdc"; - assert(expected == args[1], format!"Expected '%s' but got '%s'"(expected, args[1])); + assert(args[1].baseName.canFind(expected), + format!"Expected '%s' but got '%s'"(expected, args[1])); } From cd6dd4c27b013f912ec59b41c80966f4dba36473 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 31 May 2024 19:05:43 +0300 Subject: [PATCH 2/2] ci: bump setup-dlang v1 -> v2 Quote `$DC` in the windows scripts as it is an absolute path which contains `\` which need escaping. Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 10 +++++----- .github/workflows/pr_info_untrusted.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41a7a5ace..55b2f121c 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 @@ -89,7 +89,7 @@ jobs: # Compiler to test with - name: Prepare compiler - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.dc }} @@ -113,10 +113,10 @@ jobs: env: DUB: ${{ github.workspace }}\bin\dub.exe run: | - dub build --compiler=${{ env.DC }} + dub build --compiler="${{ env.DC }}" if [[ ${{ matrix.do_test }} == 'true' ]]; then - dub test --compiler=${{ env.DC }} - dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d + dub test --compiler="${{ env.DC }}" + dub run --compiler="${{ env.DC }}" --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d dub --single test/run-unittest.d # FIXME: DMD fails a few tests on Windows; remove them for now diff --git a/.github/workflows/pr_info_untrusted.yml b/.github/workflows/pr_info_untrusted.yml index 56b82147f..523584857 100644 --- a/.github/workflows/pr_info_untrusted.yml +++ b/.github/workflows/pr_info_untrusted.yml @@ -24,7 +24,7 @@ jobs: # Compiler to test with - name: Prepare compiler - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 with: compiler: ldc-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f94737c25..c57a221fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,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