@@ -10,45 +10,71 @@ permissions:
1010jobs :
1111 build :
1212 runs-on : ${{ matrix.image }}
13+ env :
14+ VCPKG_INSTALLED : ${{ github.workspace }}\vcpkg_installed
15+ VCPKG_DEFAULT_TRIPLET : ${{ matrix.platform }}-windows-static
1316 strategy :
1417 matrix :
15- platform : [x86, x64]
18+ platform : [x86, x64, arm64 ]
1619 configuration : [Light, Release]
1720 image : [windows-2022]
21+ include :
22+ - platform : arm64
23+ setenv : amd64_arm64
24+ crossfile : --cross-file .github/cross-arm64-windows.txt
1825 steps :
1926 - name : Install Meson
2027 run : python -m pip install meson ninja
21- - name : Install gengetopt
22- shell : C:\shells\msys2bash.cmd {0}
23- run : pacman -S --noconfirm --needed --noprogressbar gengetopt
2428 - name : Install CPDK
2529 run : choco install windows-cryptographic-provider-development-kit -y
26- - name : Install Wix 5
27- run : |
28- dotnet tool install --global wix
29- wix extension add -g WixToolset.UI.wixext
30- wix extension add -g WixToolset.Util.wixext
31- - uses : actions/checkout@v4
30+ - uses : actions/checkout@v6
31+ - name : Install WIX
32+ run : powershell -ExecutionPolicy Bypass -File .github/setup-wix.ps1
3233 - name : Setup dev env
3334 uses : ilammy/msvc-dev-cmd@v1
3435 with :
35- arch : ${{ matrix.platform }}
36+ arch : ${{ matrix.setenv || matrix.platform }}
37+ - name : Cache vcpkg
38+ uses : actions/cache@v5
39+ with :
40+ path : ${{ github.workspace }}/vcpkg_cache
41+ key : vcpkg-${{ matrix.configuration }}-${{ matrix.platform }}-${{ hashFiles('.github/vcpkg.json') }}
42+ - name : Prepare vcpkg
43+ if : matrix.configuration == 'Release'
44+ env :
45+ VCPKG_BINARY_SOURCES : clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
46+ run : >
47+ C:\vcpkg\vcpkg install
48+ --x-manifest-root ${{ github.workspace }}/.github
49+ --x-install-root ${env:VCPKG_INSTALLED}
3650 - name : Configure project (release)
3751 if : matrix.configuration == 'Release'
38- run : |
39- $env:Path += ";C:\msys64\usr\bin"
40- meson setup -Dbackend=ninja -Dbuildtype=release '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver' -Ddriver=pcsc -Dopenpace=enabled -Dopenssl=enabled -Dzlib=enabled --force-fallback-for=openssl '-Dopenpace:cv_certificates_path=%PROGRAMFILES%\\OpenSC Project\\OpenSC\\cvc' '-Dopenpace:x509_certificates_path=%PROGRAMFILES%\\OpenSC Project\\OpenSC\\x509' build/
52+ run : >
53+ meson setup build/ ${{ matrix.crossfile }}
54+ -Dbackend=ninja -Dbuildtype=debugoptimized -Dwarning_level=2
55+ -Dopenpace=enabled -Dopenssl=enabled -Dzlib=enabled
56+ '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver'
57+ --cmake-prefix-path "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
4158 - name : Configure project (light)
4259 if : matrix.configuration == 'Light'
43- run : |
44- $env:Path += ";C:\msys64\usr\bin"
45- meson setup -Dbackend=ninja -Dbuildtype=release '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver' -Ddriver=pcsc -Dopenpace=disabled -Dopenssl=disabled build/
60+ run : >
61+ meson setup build/ ${{ matrix.crossfile }}
62+ -Dbackend=ninja -Dbuildtype=debugoptimized -Dwarning_level=2
63+ -Dopenpace=disabled -Dopenssl=disabled
64+ '-Dcomponents=pkcs11,tools,sm,minidriver' '-Dstatic_components=pkcs11,sm,minidriver'
4665 - name : Build project
4766 run : |
4867 meson compile -C build/ -v
4968 meson compile -C build/ -v msi
5069 - name : Archive artifacts
51- uses : actions/upload-artifact@v4
70+ uses : actions/upload-artifact@v7
5271 with :
5372 name : msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}
5473 path : build/*.msi
74+ - name : Archive debug artifacts
75+ uses : actions/upload-artifact@v7
76+ with :
77+ name : msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}-dbg
78+ path : |
79+ build/**/*.pdb
80+ !build/**/vc*.pdb
0 commit comments