From f2c3a0050028f1c2c64e45eff17bf11bf7703975 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Wed, 30 Jul 2025 12:53:22 +0200 Subject: [PATCH 1/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 62 ++++++++++++++++++----- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index cfd517a..6d2519a 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -17,18 +17,13 @@ jobs: - platform: msvc-x64 triplet: x64-windows runner: windows-latest - # commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678 - commit: ec12d917a85839741f8345905f71b3e7f56d9ddc - platform: msvc-x86 triplet: x86-windows runner: windows-latest - # commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678 - commit: ec12d917a85839741f8345905f71b3e7f56d9ddc - platform: msvc-arm64 triplet: arm64-windows runner: windows-11-arm - # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856 - commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 + runs-on: ${{ matrix.runner }} defaults: @@ -36,11 +31,40 @@ jobs: shell: bash steps: - - name: Checkout vcpkg repository + # Use latest vcpkg for x64/x86 + - name: Checkout vcpkg (latest) uses: actions/checkout@v4 with: repository: 'microsoft/vcpkg' - ref: ${{ matrix.commit }} + ref: master + + - name: Prepare overlays (Boost + YASM) + run: | + mkdir -p vcmi-overlay-boost vcmi-overlay-yasm + + # Boost overlay (Win7 fix) + # Commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678 + # commit: ec12d917a85839741f8345905f71b3e7f56d9ddc + + git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-boost + cd temp-vcpkg-boost + git fetch origin ec12d917a85839741f8345905f71b3e7f56d9ddc + git checkout ec12d917a85839741f8345905f71b3e7f56d9ddc + cp -r ports/boost* ../vcmi-overlay-boost/ + cd .. + rm -rf temp-vcpkg-boost + + # YASM overlay (ARM64 fix) + # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856 + # commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 + + git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-yasm + cd temp-vcpkg-yasm + git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70 + git checkout 94a9df6990e426ec3fff1a4ba20016da4aafea70 + cp -r ports/yasm* ../vcmi-overlay-yasm/ + cd .. + rm -rf temp-vcpkg-yasm # NOTE: disabling debug for all triplets, so 64 host / 32 guest won't build debug version of 64-bit tools # Othervice, x86 package size is way larger than needed @@ -50,7 +74,7 @@ jobs: echo 'set(VCPKG_BUILD_TYPE release)' >>triplets/x86-windows.cmake echo 'set(VCPKG_BUILD_TYPE release)' >>triplets/arm64-windows.cmake - - name: Enable Windows 7 targeting (only for x86/x64) + - name: Enable Windows 7 targeting (x86/x64) if: matrix.triplet == 'x64-windows' || matrix.triplet == 'x86-windows' run: | echo 'set(VCPKG_CXX_FLAGS "-D_WIN32_WINNT=0x0601 -DWINVER=0x0601")' >>triplets/${{ matrix.triplet }}.cmake @@ -61,7 +85,14 @@ jobs: - name: Install dependencies run: | - ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" + if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then + ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-yasm + OVERLAY="--overlay-ports=vcmi-overlay-yasm" + else + ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-boost + OVERLAY="--overlay-ports=vcmi-overlay-boost" + fi + ./vcpkg.exe install \ tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer[core,mpg123] \ qt5-base qt5-tools \ @@ -70,17 +101,24 @@ jobs: boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \ boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \ boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \ - --triplet "${{ matrix.triplet }}" + --triplet "${{ matrix.triplet }}" $OVERLAY - name: Export packages run: | + if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then + OVERLAY="--overlay-ports=vcmi-overlay-yasm" + else + OVERLAY="--overlay-ports=vcmi-overlay-boost" + fi + ./vcpkg.exe export \ tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer qt5-base qt5-tools ffmpeg \ boost-filesystem boost-system boost-thread boost-program-options boost-locale \ boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \ boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \ boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \ - --raw --triplet "${{ matrix.triplet }}" --output=result/vcpkg + --raw --triplet "${{ matrix.triplet }}" $OVERLAY \ + --output=result/vcpkg - name: Trim pdb files run: | From 284418b0722737e8e601f616555ee42e212c8f61 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Wed, 30 Jul 2025 12:54:41 +0200 Subject: [PATCH 2/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index 6d2519a..ec55e7c 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -24,7 +24,6 @@ jobs: triplet: arm64-windows runner: windows-11-arm - runs-on: ${{ matrix.runner }} defaults: run: From 24573ffecd4d7807593bb59ef66e72ead09a46f0 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:01:11 +0200 Subject: [PATCH 3/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index ec55e7c..09b69c2 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -54,9 +54,9 @@ jobs: rm -rf temp-vcpkg-boost # YASM overlay (ARM64 fix) - # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856 + # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856 # commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 - + git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-yasm cd temp-vcpkg-yasm git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70 @@ -66,7 +66,7 @@ jobs: rm -rf temp-vcpkg-yasm # NOTE: disabling debug for all triplets, so 64 host / 32 guest won't build debug version of 64-bit tools - # Othervice, x86 package size is way larger than needed + # Otherwise, x86 package size is way larger than needed - name: Disable debug builds run: | echo 'set(VCPKG_BUILD_TYPE release)' >>triplets/x64-windows.cmake From 6cf959c9e0cfc71ba5bfd0c5fe769d8ff2b0ec19 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:37:34 +0200 Subject: [PATCH 4/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 28 +++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index 09b69c2..e6ba48f 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -41,29 +41,27 @@ jobs: run: | mkdir -p vcmi-overlay-boost vcmi-overlay-yasm - # Boost overlay (Win7 fix) - # Commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678 - # commit: ec12d917a85839741f8345905f71b3e7f56d9ddc + # Clone vcpkg once + git clone https://github.com/microsoft/vcpkg.git temp-vcpkg + cd temp-vcpkg - git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-boost - cd temp-vcpkg-boost - git fetch origin ec12d917a85839741f8345905f71b3e7f56d9ddc + # Boost overlay (Win7 fix) + # Commit before addition of boost filesystem 1.87 that removes Win7 support: + # https://github.com/microsoft/vcpkg/pull/42678 + # Commit: ec12d917a85839741f8345905f71b3e7f56d9ddc git checkout ec12d917a85839741f8345905f71b3e7f56d9ddc cp -r ports/boost* ../vcmi-overlay-boost/ - cd .. - rm -rf temp-vcpkg-boost # YASM overlay (ARM64 fix) - # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856 - # commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 - - git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-yasm - cd temp-vcpkg-yasm - git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70 + # Commit before changes to yasm package which seem to break ARM builds: + # https://github.com/microsoft/vcpkg/pull/45856 + # Commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 git checkout 94a9df6990e426ec3fff1a4ba20016da4aafea70 cp -r ports/yasm* ../vcmi-overlay-yasm/ + + # Switch back to master for the rest of the ports + git checkout master cd .. - rm -rf temp-vcpkg-yasm # NOTE: disabling debug for all triplets, so 64 host / 32 guest won't build debug version of 64-bit tools # Otherwise, x86 package size is way larger than needed From 701fb51b75174e4be73a6feb4bc2d808a4d81567 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Thu, 31 Jul 2025 19:43:27 +0200 Subject: [PATCH 5/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index e6ba48f..0adf05f 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -41,10 +41,6 @@ jobs: run: | mkdir -p vcmi-overlay-boost vcmi-overlay-yasm - # Clone vcpkg once - git clone https://github.com/microsoft/vcpkg.git temp-vcpkg - cd temp-vcpkg - # Boost overlay (Win7 fix) # Commit before addition of boost filesystem 1.87 that removes Win7 support: # https://github.com/microsoft/vcpkg/pull/42678 @@ -61,7 +57,6 @@ jobs: # Switch back to master for the rest of the ports git checkout master - cd .. # NOTE: disabling debug for all triplets, so 64 host / 32 guest won't build debug version of 64-bit tools # Otherwise, x86 package size is way larger than needed From 0f500a065d01b56475c888dfc7c2c166d7470c74 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Thu, 31 Jul 2025 19:47:30 +0200 Subject: [PATCH 6/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 25 ++++++++--------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index 0adf05f..e9ba898 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -17,12 +17,15 @@ jobs: - platform: msvc-x64 triplet: x64-windows runner: windows-latest + overlay: vcmi-overlay-boost - platform: msvc-x86 triplet: x86-windows runner: windows-latest + overlay: vcmi-overlay-boost - platform: msvc-arm64 triplet: arm64-windows runner: windows-11-arm + overlay: vcmi-overlay-yasm runs-on: ${{ matrix.runner }} defaults: @@ -77,14 +80,8 @@ jobs: - name: Install dependencies run: | - if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then - ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-yasm - OVERLAY="--overlay-ports=vcmi-overlay-yasm" - else - ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-boost - OVERLAY="--overlay-ports=vcmi-overlay-boost" - fi - + ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=${{ matrix.overlay }} + ./vcpkg.exe install \ tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer[core,mpg123] \ qt5-base qt5-tools \ @@ -93,23 +90,19 @@ jobs: boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \ boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \ boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \ - --triplet "${{ matrix.triplet }}" $OVERLAY + --triplet "${{ matrix.triplet }}" \ + --overlay-ports=${{ matrix.overlay }} - name: Export packages run: | - if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then - OVERLAY="--overlay-ports=vcmi-overlay-yasm" - else - OVERLAY="--overlay-ports=vcmi-overlay-boost" - fi - ./vcpkg.exe export \ tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer qt5-base qt5-tools ffmpeg \ boost-filesystem boost-system boost-thread boost-program-options boost-locale \ boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \ boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \ boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \ - --raw --triplet "${{ matrix.triplet }}" $OVERLAY \ + --raw --triplet "${{ matrix.triplet }}" \ + --overlay-ports=${{ matrix.overlay }} \ --output=result/vcpkg - name: Trim pdb files From 7508dc512e938a3c9a08c9b1c79fbd97f5aaea8c Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Thu, 31 Jul 2025 19:50:42 +0200 Subject: [PATCH 7/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index e9ba898..adbfee4 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -48,6 +48,7 @@ jobs: # Commit before addition of boost filesystem 1.87 that removes Win7 support: # https://github.com/microsoft/vcpkg/pull/42678 # Commit: ec12d917a85839741f8345905f71b3e7f56d9ddc + git fetch origin ec12d917a85839741f8345905f71b3e7f56d9ddc git checkout ec12d917a85839741f8345905f71b3e7f56d9ddc cp -r ports/boost* ../vcmi-overlay-boost/ @@ -55,6 +56,7 @@ jobs: # Commit before changes to yasm package which seem to break ARM builds: # https://github.com/microsoft/vcpkg/pull/45856 # Commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 + git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70 git checkout 94a9df6990e426ec3fff1a4ba20016da4aafea70 cp -r ports/yasm* ../vcmi-overlay-yasm/ From 46102842d0b6b6cbf15293aea180d5b273880792 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Thu, 31 Jul 2025 19:53:48 +0200 Subject: [PATCH 8/8] Update rebuildDependencies.yml --- .github/workflows/rebuildDependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebuildDependencies.yml b/.github/workflows/rebuildDependencies.yml index adbfee4..289ef99 100644 --- a/.github/workflows/rebuildDependencies.yml +++ b/.github/workflows/rebuildDependencies.yml @@ -50,7 +50,7 @@ jobs: # Commit: ec12d917a85839741f8345905f71b3e7f56d9ddc git fetch origin ec12d917a85839741f8345905f71b3e7f56d9ddc git checkout ec12d917a85839741f8345905f71b3e7f56d9ddc - cp -r ports/boost* ../vcmi-overlay-boost/ + cp -r ports/boost* vcmi-overlay-boost/ # YASM overlay (ARM64 fix) # Commit before changes to yasm package which seem to break ARM builds: @@ -58,7 +58,7 @@ jobs: # Commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70 git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70 git checkout 94a9df6990e426ec3fff1a4ba20016da4aafea70 - cp -r ports/yasm* ../vcmi-overlay-yasm/ + cp -r ports/yasm* vcmi-overlay-yasm/ # Switch back to master for the rest of the ports git checkout master