From 61747850cd075307035a578891ee8dcfa786d3fa Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Fri, 10 May 2024 01:39:15 +0200 Subject: [PATCH 1/4] GHA: Switch from macos-latest (currently *arm64* macOS 14) to macOS 12 --- .github/workflows/build_release_template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_release_template.yml b/.github/workflows/build_release_template.yml index 2b0ad631..bf9c6864 100644 --- a/.github/workflows/build_release_template.yml +++ b/.github/workflows/build_release_template.yml @@ -126,7 +126,7 @@ jobs: include: - os: ubuntu-20.04 target: linux - - os: macos-latest + - os: macos-12 target: osx - os: windows-2019 target: windows From 673ccb4598bf09663262727f499d13ac62e0ac17 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Fri, 10 May 2024 01:58:41 +0200 Subject: [PATCH 2/4] GHA: Bump actions/{checkout,{up,down}load-artifact} versions To get rid of deprecations and hopefully benefit from improved performance for up/download-artifact v4. --- .github/workflows/build_release_template.yml | 16 +++++++------- .github/workflows/build_windows.yml | 22 ++++++++++---------- .github/workflows/test_release.yml | 6 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_release_template.yml b/.github/workflows/build_release_template.yml index bf9c6864..a7b7f4a1 100644 --- a/.github/workflows/build_release_template.yml +++ b/.github/workflows/build_release_template.yml @@ -51,21 +51,21 @@ jobs: steps: # Clone all required repos - name: Clone dmd - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: 'dlang/dmd' ref: ${{ inputs.release_branch }} path: 'dmd' - name: Clone phobos - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: 'dlang/phobos' ref: ${{ inputs.release_branch }} path: 'phobos' - name: Clone dlang.org - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: 'dlang/dlang.org' ref: ${{ inputs.release_branch }} @@ -93,7 +93,7 @@ jobs: # Save the generated documentation for the target-specific builds - name: Upload generated docs as a temporary artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dmd-documentation path: dlang.org/web @@ -192,7 +192,7 @@ jobs: # Clone dlang/installer which provides the actual build scripts # - name: Clone installer repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ inputs.installer_repo }} ref: ${{ inputs.installer_branch }} @@ -201,7 +201,7 @@ jobs: # Load the generated documentation in the create_dmd_release folder # - name: Download docs generated by the previous job - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dmd-documentation path: create_dmd_release/docs @@ -306,9 +306,9 @@ jobs: # job(s) have access to all generated releases # - name: Upload generated release as a temporary artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: dmd-release + name: dmd-release-${{ matrix.target }} path: | ${{ github.workspace }}/create_dmd_release/build/* !${{ github.workspace }}/create_dmd_release/build/*.zip diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 01eac6c0..d0531448 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -22,12 +22,12 @@ jobs: LLVM_VER: 9.0.0 ARCH: ${{ matrix.arch }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - shell: cmd run: call windows\build_lld.bat || exit /b - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: lld-${{ matrix.arch }} path: artifacts/ @@ -42,12 +42,12 @@ jobs: MINGW_VER: 8.0.0 D_VERSION: 2.077.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - shell: cmd run: call windows\build_mingw.bat || exit /b - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: mingw-libs path: artifacts/ @@ -63,12 +63,12 @@ jobs: ZLIB_VER: 1.2.11 PEXPORTS_VER: 0.47 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - shell: cmd run: call windows\build_curl.bat || exit /b - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: curl path: artifacts/ @@ -78,7 +78,7 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 120 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Clone repos @@ -94,7 +94,7 @@ jobs: set -eux mkdir -p work/docs zip -r work/docs/docs.zip work/dlang.org/web - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: docs path: work/docs @@ -108,11 +108,11 @@ jobs: LDC_VSDIR: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\ HOST_LDC_VERSION: 1.23.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Download docs artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: docs path: docs/ @@ -162,7 +162,7 @@ jobs: cd .. || exit /b mkdir artifacts || exit /b copy windows\*.exe artifacts || exit /b - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: win_release path: artifacts/ diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index da83e100..fa2f74e2 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -51,12 +51,12 @@ jobs: steps: - name: Download generated releases from the artifacts id: download-release - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: dmd-release + name: dmd-release-${{ matrix.os }} - name: Clone installer repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: installer From d6d0c165fb58135f7bb7d19a35513233563048ed Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 9 May 2024 23:53:06 +0200 Subject: [PATCH 3/4] Remove all references to optlink --- create_dmd_release/build_all.d | 4 ---- create_dmd_release/create_dmd_release.d | 9 --------- .../extras/windows/dmd2/windows/bin/README.TXT | 1 - 3 files changed, 14 deletions(-) diff --git a/create_dmd_release/build_all.d b/create_dmd_release/build_all.d index 0466f5c7..b54e8b25 100644 --- a/create_dmd_release/build_all.d +++ b/create_dmd_release/build_all.d @@ -574,7 +574,6 @@ int main(string[] args) immutable isPreRelease = isBranch || !verMatch.captures[4].empty; immutable dubTag = isBranch ? gitTag : getDubTag(isPreRelease); - enum optlink = "optlink.zip"; enum libC = "snn.lib"; enum libCurl = "libcurl-7.68.0-WinSSL-zlib-x86-x64.zip"; enum mingwtag = "mingw-libs-8.0.0"; @@ -599,7 +598,6 @@ int main(string[] args) const hasWindows = platforms.any!(p => p.os == OS.windows); if (hasWindows) { - fetchFile("http://ftp.digitalmars.com/"~optlink, cacheDir~"/"~optlink); fetchFile("http://ftp.digitalmars.com/"~libC, cacheDir~"/"~libC); fetchFile("https://downloads.dlang.org/other/"~libCurl, cacheDir~"/"~libCurl, verifySignature); fetchFile("https://downloads.dlang.org/other/"~lld, cacheDir~"/"~lld, verifySignature, lld_sha); @@ -628,8 +626,6 @@ int main(string[] args) if (hasWindows) { - // add latest optlink - extract(cacheDir~"/"~optlink, workDir~"/windows/extraBins/dmd2/windows/bin/"); if (exists(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe")) remove(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe"); // add latest dmc libC (snn.lib) diff --git a/create_dmd_release/create_dmd_release.d b/create_dmd_release/create_dmd_release.d index 2350a0a1..86b78df1 100644 --- a/create_dmd_release/create_dmd_release.d +++ b/create_dmd_release/create_dmd_release.d @@ -16,8 +16,6 @@ Prerequisites to Run: Examples: set LDC_VSDIR="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\" - Windows: A GNU make, found in PATH as mingw32-make (to avoid DM make.exe bundled with DMC). -- Windows: A version of OPTLINK with the /LA[RGEADDRESSAWARE] flag: - - Windows: Microsoft's HTML Help Workshop on the PATH. Typical Usage: @@ -523,13 +521,6 @@ void createRelease(string branch) if(do64Bit) { copyFile(cloneDir~"/dmd/generated/"~osDirName~"/release/64/dmd"~exe, releaseBin64Dir~"/dmd"~exe); - version(Windows) - { - // patch sc.ini to point to optlink.exe in bin folder - auto sc_ini = cast(string)std.file.read(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini"); - sc_ini = sc_ini.replace(`%@P%\optlink.exe`, `%@P%\..\bin\optlink.exe`); - std.file.write(releaseBin64Dir~"/sc.ini", sc_ini); - } copyDir(cloneDir~"/tools/generated/"~osDirName~"/64", releaseBin64Dir, file => !file.endsWith(obj)); copyFile(cloneDir~"/dub/bin/dub64"~exe, releaseBin64Dir~"/dub"~exe); if (codesign) diff --git a/create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT b/create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT index 94d0227a..e4845d2c 100644 --- a/create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT +++ b/create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT @@ -11,7 +11,6 @@ lib.exe Librarian http://www.digitalmars.com/ctg/lib.html libcurl.dll Curl Library https://curl.haxx.se/ lld-link.exe LLVM Linker https://lld.llvm.org/ make.exe Make program http://www.digitalmars.com/ctg/make.html -optlink.exe Linker http://www.digitalmars.com/ctg/optlink.html rdmd.exe Run D program as a script http://dlang.org/rdmd.html replace.exe Find/replace text in file(s) shell.exe Test script runner http://www.digitalmars.com/ctg/shell.html From da4b105877ed818cdd2e3b57555d3250676b235c Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 26 May 2024 00:59:03 +0200 Subject: [PATCH 4/4] Windows: Fix missing bin64\sc.ini Looks like a regression in stable? --- create_dmd_release/create_dmd_release.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/create_dmd_release/create_dmd_release.d b/create_dmd_release/create_dmd_release.d index 86b78df1..6240cc3f 100644 --- a/create_dmd_release/create_dmd_release.d +++ b/create_dmd_release/create_dmd_release.d @@ -521,6 +521,8 @@ void createRelease(string branch) if(do64Bit) { copyFile(cloneDir~"/dmd/generated/"~osDirName~"/release/64/dmd"~exe, releaseBin64Dir~"/dmd"~exe); + version(Windows) + copyFile(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini", releaseBin64Dir~"/sc.ini"); copyDir(cloneDir~"/tools/generated/"~osDirName~"/64", releaseBin64Dir, file => !file.endsWith(obj)); copyFile(cloneDir~"/dub/bin/dub64"~exe, releaseBin64Dir~"/dub"~exe); if (codesign)