From c8adf5d702ccf8e50aea4cb8739e3df3a948a4fa Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 29 Apr 2025 22:36:15 +0100 Subject: [PATCH] Update Windows CI to windows-2025 windows-2019 will be fully retired by the end of June, and 2025 is the latest version. This means that Windows build artifacts will be built using MSVC 2022, not MSVC 2019. They should be ABI-compatible across this change, since they expose no third-party types and Microsoft say that their compiler and standard library didn't break ABI between 2019 and 2022, but a newer version of the redistributable might be needed. --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/release.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0835f4a..24659a87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: env: BOOST_VERSION: 1.87.0 + CBINDGEN_VERSION: 0.28.0 CARGO_TERM_COLOR: always MSVC_CONFIG: RelWithDebInfo @@ -65,7 +66,7 @@ jobs: # The version in apt is too old. - name: Install cbindgen run: | - wget https://github.com/mozilla/cbindgen/releases/download/0.28.0/cbindgen + wget https://github.com/mozilla/cbindgen/releases/download/$CBINDGEN_VERSION/cbindgen BIN_PATH="$HOME/.local/bin/" mkdir -p "$BIN_PATH" mv cbindgen "$BIN_PATH" @@ -127,7 +128,7 @@ jobs: if: github.event_name == 'push' windows: - runs-on: windows-2019 + runs-on: windows-2025 strategy: matrix: @@ -173,9 +174,12 @@ jobs: LIBLOOT_SAFE_DESC_REF=${LIBLOOT_DESC_REF//[\/<>\"|]/_} echo "version=$LIBLOOT_SAFE_DESC_REF" >> $GITHUB_OUTPUT + - name: Install cbindgen + run: cargo install --version $env:CBINDGEN_VERSION cbindgen + - name: Run CMake run: | - cmake -G "Visual Studio 16 2019" ` + cmake -G "Visual Studio 17 2022" ` -A ${{ matrix.platform }} ` -DCMAKE_PREFIX_PATH="${{ steps.boost-metadata.outputs.root }}\stage" ` -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" ` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c23c60d..17d5b491 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,7 @@ on: env: BOOST_VERSION: 1.87.0 + CBINDGEN_VERSION: 0.28.0 CARGO_TERM_COLOR: always MSVC_CONFIG: RelWithDebInfo @@ -29,14 +30,14 @@ jobs: tag_name: ${{ steps.get-git-tag.outputs.name }} release_name: libloot v${{ steps.get-git-tag.outputs.name }} body: | - Requires Windows 7 or later, the MSVC 2019 [x86](https://aka.ms/vs/16/release/vc_redist.x86.exe) or [x64](https://aka.ms/vs/16/release/vc_redist.x64.exe) redistributable for 32-bit and 64-bit builds respectively, and [7-Zip](http://www.7-zip.org/) to extract the archives. + Requires Windows 7 or later, the MSVC 2022 [x86](https://aka.ms/vs/17/release/vc_redist.x86.exe) or [x64](https://aka.ms/vs/17/release/vc_redist.x64.exe) redistributable for 32-bit and 64-bit builds respectively, and [7-Zip](http://www.7-zip.org/) to extract the archives. ## Change Logs - [API](https://loot-api.readthedocs.io/en/latest/api/changelog.html) - [Metadata Syntax](https://loot-api.readthedocs.io/en/latest/metadata/changelog.html) windows: - runs-on: windows-2019 + runs-on: windows-2025 needs: create_release strategy: @@ -74,9 +75,12 @@ jobs: python install_boost.py --directory ${{ github.workspace }} --boost-version ${{ env.BOOST_VERSION }} -a 64 system if: steps.boost-cache.outputs.cache-hit != 'true' + - name: Install cbindgen + run: cargo install --version $env:CBINDGEN_VERSION cbindgen + - name: Run CMake run: | - cmake -G "Visual Studio 16 2019" ` + cmake -G "Visual Studio 17 2022" ` -A ${{ matrix.platform }} ` -DCMAKE_PREFIX_PATH="${{ steps.boost-metadata.outputs.root }}\stage" ` -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}" `