diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 2c6da637..fc32b9c2 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -24,19 +24,6 @@ jobs: with: compiler: ${{ matrix.dc }} - # Work around hardcoded `dmd` compiler in integration tests - - name: "LDC: Symlink dmd to ldmd2" - if: matrix.dc == 'ldc-beta' - shell: bash - run: | - set -ex - ldcBinDir=$(dirname $(which ldmd2)) - if [[ '${{ runner.os }}' == 'Windows' ]]; then - cp $ldcBinDir/ldmd2.exe $ldcBinDir/dmd.exe - else - ln -s $ldcBinDir/ldmd2 $ldcBinDir/dmd - fi - - name: "Posix: Run tests" if: runner.os != 'Windows' run: dub -q test -- ~@tup ~@travis_oops @@ -86,7 +73,12 @@ jobs: - name: Set OS-specific SCRIPT_CMD environment variable run: | if [[ '${{ runner.os }}' == 'Windows' ]]; then - echo "SCRIPT_CMD=./bootstrap.bat" >> $GITHUB_ENV + if [[ '${{ matrix.dc }}' = ldc* ]]; then + # avoid out-of-memory kills by using a single ninja job + echo "SCRIPT_CMD=cmd.exe //c call bootstrap.bat -j1" >> $GITHUB_ENV + else + echo "SCRIPT_CMD=cmd.exe //c call bootstrap.bat" >> $GITHUB_ENV + fi else echo "SCRIPT_CMD=./bootstrap.sh" >> $GITHUB_ENV fi @@ -95,5 +87,5 @@ jobs: run: ${{ env.SCRIPT_CMD }} - name: "LDC: Bootstrap with DC=ldmd2" - if: matrix.dc == 'ldc-beta' + if: startsWith(matrix.dc, 'ldc') run: DC=ldmd2 ${{ env.SCRIPT_CMD }} diff --git a/bootstrap.bat b/bootstrap.bat index 3e9ff16d..2d51c33e 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -1,9 +1,7 @@ @echo off setlocal -set BACKEND=%1 if "%BACKEND%" == "" set BACKEND=ninja - if "%DC%" == "" set DC=dmd if exist bin rmdir /s /q bin @@ -15,4 +13,4 @@ cd bin || exit /b echo Running bootstrapped reggae with backend %BACKEND% reggae -b "%BACKEND%" --dc="%DC%" .. || exit /b -%BACKEND% || exit /b +%BACKEND% %* || exit /b diff --git a/dub.json b/dub.json index c329ea37..f604dc3d 100644 --- a/dub.json +++ b/dub.json @@ -13,7 +13,7 @@ "excludedSourceFiles": ["payload/reggae/buildgen_main.d"], "mainSourceFile": "src/reggae/reggae_main.d", "dependencies": { - "dub": "~>1.32.1" + "dub": "~>1.33.1" }, "subConfigurations": { "dub": "library" diff --git a/dub.selections.json b/dub.selections.json index 9a404d06..4b66dccd 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -1,7 +1,7 @@ { "fileVersion": 1, "versions": { - "dub": "1.32.1", + "dub": "1.33.1", "unit-threaded": "2.1.2" } } diff --git a/payload/reggae/dub/info.d b/payload/reggae/dub/info.d index 1d6e5a61..81d55f11 100644 --- a/payload/reggae/dub/info.d +++ b/payload/reggae/dub/info.d @@ -31,6 +31,7 @@ struct DubPackage { string[] dflags; string[] lflags; string[] importPaths; + string[] cImportPaths; string[] stringImportPaths; string[] files; TargetType targetType; @@ -145,7 +146,8 @@ struct DubInfo { import std.string: indexOf, stripRight; const dubPackage = packages[dubPackageIndex]; - const importPaths = dubPackage.packagePaths(dubPackage.importPaths); + const importPaths = dubPackage.packagePaths( + dubPackage.importPaths ~ dubPackage.cImportPaths); const stringImportPaths = dubPackage.packagePaths(dubPackage.stringImportPaths); const isMainPackage = dubPackageIndex == 0; //the path must be explicit for the other packages, implicit for the "main" diff --git a/src/reggae/dub/interop/dublib.d b/src/reggae/dub/interop/dublib.d index 8c40951e..51ca9181 100644 --- a/src/reggae/dub/interop/dublib.d +++ b/src/reggae/dub/interop/dublib.d @@ -333,7 +333,7 @@ class InfoGenerator: ProjectGenerator { enum sameNameProperties = [ "mainSourceFile", "dflags", "lflags", "importPaths", - "stringImportPaths", "versions", "libs", + "cImportPaths", "stringImportPaths", "versions", "libs", ]; static foreach(prop; sameNameProperties) { mixin(`pkg.`, prop, ` = newBuildSettings.`, prop, `;`); diff --git a/src/reggae/dub/interop/fetch.d b/src/reggae/dub/interop/fetch.d index 97233fa6..1f6775db 100644 --- a/src/reggae/dub/interop/fetch.d +++ b/src/reggae/dub/interop/fetch.d @@ -94,7 +94,8 @@ private bool pkgExistsOnFS(in VersionedPackage pkg) @safe { return buildPath( dubPackagesDir, - pkg.name ~ "-" ~ version_, + pkg.name, + version_, pkg.name ~ ".lock" ).exists; }