diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cac0e71..735c968 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,14 +88,12 @@ if: runner.os == 'Windows' env: DUB: ${{ github.workspace }}\bin\dub.exe - # Only run `dub test` to run unittests so far, - # the test-suite needs to be overhauled to support Windows run: | 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 - cd test - dub --single run-unittest.d + dub --single test/run-unittest.d + test/run-unittest.sh fi shell: bash diff --git a/test/run-unittest.sh b/test/run-unittest.sh index 00786e6..5ef1c1c 100755 --- a/test/run-unittest.sh +++ b/test/run-unittest.sh @@ -39,10 +39,10 @@ if [ -z ${FRONTEND:-} ]; then if [ "$DC_BIN" == "ldc2" ]; then - FRONTEND=$(ldc2 --version | grep -Po "based on DMD v\K(2\.\d+\.\d)") + FRONTEND=$(ldc2 --version | grep 'based on DMD v2.' | sed -E -n 's/^.*DMD v(2\.[0-9]+\.[0-9]).*$/\1/p') fi if [ "$DC_BIN" == "dmd" ]; then - FRONTEND=$(dmd --version | grep -Po "D Compiler v\K(2\.\d+\.\d)") + FRONTEND=$(dmd --version | grep 'D Compiler v2.' | sed -E -n 's/^.*D Compiler v(2\.[0-9]+\.[0-9]).*$/\1/p') fi fi