From bccdffb93a7d0d187e521d94ab4d1dabba8d0d59 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 5 May 2025 11:43:41 +0200 Subject: [PATCH 1/3] build-and-deploy: drop work around for cURL v8.11.0 When deploying curl-8.11.0-2, a problem needed to be worked around: that cURL version, v8.11.0, had a bug that needed to be fixed, but the fix could not be deployed because of that bug. To work around this problem, the `build-and-deploy` workflow needed to force-downgrade the `curl` package. This workaround is no longer needed, therefore we can drop it. Signed-off-by: Johannes Schindelin --- .github/workflows/build-and-deploy.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 2caff6f1..5229d5e1 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -105,30 +105,6 @@ jobs: architecture: ${{ env.ARCHITECTURE || 'x86_64' }} msys: ${{ env.REPO == 'MSYS2-packages' || env.PACKAGE_TO_BUILD == 'git-for-windows-keyring' }} - - name: work around curl v8.11.0-1 problem - if: env.PACKAGE_TO_BUILD == 'curl' && env. REF == 'd58b04ae4163fe6c6c25b330bea0930d7bb627ac' - shell: bash - run: | - # `git fetch` does not work with that libcurl version. For details, - # see https://github.com/git-for-windows/MSYS2-packages/pull/199 - test ! -f /var/lib/pacman/local/libcurl-8.11.0-1/desc || - for pkg in libcurl curl - do - case "$ARCHITECTURE" in - i686) url=https://wingit.blob.core.windows.net/i686/$pkg-8.10.1-1-i686.pkg.tar.xz;; - x86_64) url=https://wingit.blob.core.windows.net/x86-64/$pkg-8.10.1-1-x86_64.pkg.tar.xz;; - esac - for suffix in '' .sig - do - curl --retry 5 -fLO $url$suffix || exit 1 - done - pacman -U --noconfirm ${url##*/} || exit 1 - done - - # Sadly, this does not work because the Pacman repository's index only - # ever lists the latest package version: - # pacman -S --noconfirm libcurl=8.10.1-1 curl=8.10.1-1 - - name: Clone ${{ env.REPO }} shell: bash run: | From 7c90eb1b671e3f7985a57cf4b8b1f16fb7181a53 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 5 May 2025 11:53:01 +0200 Subject: [PATCH 2/3] build-and-deploy: skip deployment check in "build-only" mode When this workflow is run in "build-only" mode, we do not want to deploy the package and therefore it is not necessary to check whether the package has been deployed already. Signed-off-by: Johannes Schindelin --- .github/workflows/build-and-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 5229d5e1..e637c3d7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,7 +8,7 @@ on: description: 'The package to build' required: true build_only: - description: 'Skip deployment (if non-empty)' + description: 'Skip deployment (if "true")' required: false repo: description: 'The repo containing the package definition' @@ -115,6 +115,7 @@ jobs: git -C /usr/src/$REPO reset --hard FETCH_HEAD - name: check if the package was already deployed + if: env.BUILD_ONLY != 'true' shell: bash run: | ./update-scripts/ensure-not-yet-deployed.sh${{ env.ARCHITECTURE != '' && format(' --architecture={0}', env.ARCHITECTURE) || '' }} "/usr/src/$REPO/$PACKAGE_TO_BUILD" From e821eb52ef37de17632cb19fd31ec024b5e07497 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 5 May 2025 14:42:30 +0200 Subject: [PATCH 3/3] build-and-deploy: set MINGW_ARCH appropriately for i686/x86_64 builds In the future, we want to build the packages in the appropriate git-sdk for the given CPU architecture. Right now, we still build i686/x86_64 MINGW packages in git-sdk-64. Let's respect the `ARCHITECTURE` environment variable (which is left empty in the current workflow runs that want to build i686/x86_64 MINGW packages), and set `MINGW_ARCH` appropriately when the `ARCHITECTURE` is set to `i686` or `x86_64` (which we will do in the future). Signed-off-by: Johannes Schindelin --- .github/workflows/build-and-deploy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index e637c3d7..71cfc0df 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -241,10 +241,12 @@ jobs: MINGW_ARCHS_TO_BUILD=$( case "$ARCHITECTURE,$PACKAGE_TO_BUILD" in aarch64,*) echo "clangarm64";; - *,mingw-w64-wintoast) echo "mingw32 mingw64 clangarm64";; # We're (cross-)compiling via Visual Studio - *,mingw-w64-git-credential-manager) echo "mingw32 mingw64 clangarm64";; # We're downloading the pre-built x86 artifacts and using them for all three platforms - *,mingw-w64-git-lfs) echo "mingw32 mingw64 clangarm64";; # We're downloading the pre-built artifacts from Git LFS' official release page - *) echo "mingw32 mingw64";; + x86_64,*) echo "mingw64";; + i686,*) echo "mingw32";; + ,mingw-w64-wintoast) echo "mingw32 mingw64 clangarm64";; # We're (cross-)compiling via Visual Studio + ,mingw-w64-git-credential-manager) echo "mingw32 mingw64 clangarm64";; # We're downloading the pre-built x86 artifacts and using them for all three platforms + ,mingw-w64-git-lfs) echo "mingw32 mingw64 clangarm64";; # We're downloading the pre-built artifacts from Git LFS' official release page + ,*) echo "mingw32 mingw64";; esac )