@@ -17,30 +17,54 @@ jobs:
1717 - platform: msvc-x64
1818 triplet: x64-windows
1919 runner: windows-latest
20- # commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678
21- commit : ec12d917a85839741f8345905f71b3e7f56d9ddc
2220 - platform: msvc-x86
2321 triplet: x86-windows
2422 runner: windows-latest
25- # commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678
26- commit : ec12d917a85839741f8345905f71b3e7f56d9ddc
2723 - platform: msvc-arm64
2824 triplet: arm64-windows
2925 runner: windows-11-arm
30- # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856
31- commit : 94a9df6990e426ec3fff1a4ba20016da4aafea70
26+
3227
3328 runs-on: ${{ matrix.runner }}
3429 defaults:
3530 run:
3631 shell: bash
3732
3833 steps:
39- - name : Checkout vcpkg repository
34+ # Use latest vcpkg for x64/x86
35+ - name: Checkout vcpkg (latest)
4036 uses: actions/checkout@v4
4137 with:
4238 repository: 'microsoft/vcpkg'
43- ref : ${{ matrix.commit }}
39+ ref: master
40+
41+ - name: Prepare overlays (Boost + YASM)
42+ run: |
43+ mkdir -p vcmi-overlay-boost vcmi-overlay-yasm
44+
45+ # Boost overlay (Win7 fix)
46+ # Commit before addition of boost filesystem 1.87 that removes Win7 support https://github.com/microsoft/vcpkg/pull/42678
47+ # commit: ec12d917a85839741f8345905f71b3e7f56d9ddc
48+
49+ git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-boost
50+ cd temp-vcpkg-boost
51+ git fetch origin ec12d917a85839741f8345905f71b3e7f56d9ddc
52+ git checkout ec12d917a85839741f8345905f71b3e7f56d9ddc
53+ cp -r ports/boost* ../vcmi-overlay-boost/
54+ cd ..
55+ rm -rf temp-vcpkg-boost
56+
57+ # YASM overlay (ARM64 fix)
58+ # commit before changes to yasm package which seems to break ARM builds https://github.com/microsoft/vcpkg/pull/45856
59+ # commit: 94a9df6990e426ec3fff1a4ba20016da4aafea70
60+
61+ git clone --depth=1 https://github.com/microsoft/vcpkg.git temp-vcpkg-yasm
62+ cd temp-vcpkg-yasm
63+ git fetch origin 94a9df6990e426ec3fff1a4ba20016da4aafea70
64+ git checkout 94a9df6990e426ec3fff1a4ba20016da4aafea70
65+ cp -r ports/yasm* ../vcmi-overlay-yasm/
66+ cd ..
67+ rm -rf temp-vcpkg-yasm
4468
4569 # NOTE: disabling debug for all triplets, so 64 host / 32 guest won't build debug version of 64-bit tools
4670 # Othervice, x86 package size is way larger than needed
5074 echo 'set(VCPKG_BUILD_TYPE release)' >>triplets/x86-windows.cmake
5175 echo 'set(VCPKG_BUILD_TYPE release)' >>triplets/arm64-windows.cmake
5276
53- - name : Enable Windows 7 targeting (only for x86/x64)
77+ - name: Enable Windows 7 targeting (x86/x64)
5478 if: matrix.triplet == 'x64-windows' || matrix.triplet == 'x86-windows'
5579 run: |
5680 echo 'set(VCPKG_CXX_FLAGS "-D_WIN32_WINNT=0x0601 -DWINVER=0x0601")' >>triplets/${{ matrix.triplet }}.cmake
6185
6286 - name: Install dependencies
6387 run: |
64- ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}"
88+ if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then
89+ ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-yasm
90+ OVERLAY="--overlay-ports=vcmi-overlay-yasm"
91+ else
92+ ./vcpkg.exe install yasm --triplet "${{ matrix.triplet }}" --overlay-ports=vcmi-overlay-boost
93+ OVERLAY="--overlay-ports=vcmi-overlay-boost"
94+ fi
95+
6596 ./vcpkg.exe install \
6697 tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer[core,mpg123] \
6798 qt5-base qt5-tools \
@@ -70,17 +101,24 @@ jobs:
70101 boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \
71102 boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \
72103 boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \
73- --triplet "${{ matrix.triplet }}"
104+ --triplet "${{ matrix.triplet }}" $OVERLAY
74105
75106 - name: Export packages
76107 run: |
108+ if [ "${{ matrix.platform }}" == "msvc-arm64" ]; then
109+ OVERLAY="--overlay-ports=vcmi-overlay-yasm"
110+ else
111+ OVERLAY="--overlay-ports=vcmi-overlay-boost"
112+ fi
113+
77114 ./vcpkg.exe export \
78115 tbb fuzzylite sdl2 sdl2-image sdl2-ttf sdl2-mixer qt5-base qt5-tools ffmpeg \
79116 boost-filesystem boost-system boost-thread boost-program-options boost-locale \
80117 boost-iostreams boost-headers boost-foreach boost-format boost-crc boost-logic \
81118 boost-multi-array boost-ptr-container boost-heap boost-bimap boost-asio \
82119 boost-stacktrace boost-assign boost-geometry boost-uuid boost-process \
83- --raw --triplet "${{ matrix.triplet }}" --output=result/vcpkg
120+ --raw --triplet "${{ matrix.triplet }}" $OVERLAY \
121+ --output=result/vcpkg
84122
85123 - name: Trim pdb files
86124 run: |
0 commit comments