@@ -26,26 +26,36 @@ jobs:
2626 path : libdigidocpp-pkg
2727 repo : open-eid/libdigidocpp
2828 - name : Install dependencies
29- env :
30- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK : YES
3129 run : |
3230 brew install flatbuffers
33- HASH=($(shasum prepare_osx_build_environment.sh))
3431 curl -O -L -s https://installer.id.ee/media/github/opensc_0.26.1.pkg
35- curl -O -L -s https://installer.id.ee/media/github/${HASH}.zip
3632 sudo installer -verboseR -pkg libdigidocpp-pkg/build/macos/libdigidocpp*.pkg -target /
3733 sudo installer -verboseR -pkg opensc_*.pkg -target /
38- sudo unzip -qq -d /Library/Developer ${HASH}.zip
3934 rm -rf libdigidocpp-pkg
35+ - name : Cache libraries
36+ uses : actions/cache@v4
37+ with :
38+ path : cache
39+ key : vcpkg-macOS-${{ hashFiles('prepare_osx_build_environment.sh') }}
40+ - name : Build libraries
41+ run : |
42+ sudo mkdir -p cache/Qt-6.9.2-OpenSSL
43+ sudo ./prepare_osx_build_environment.sh -p cache
44+ - name : Install Qt
45+ uses : jurplel/install-qt-action@v4
46+ with :
47+ version : 6.9.2
48+ arch : clang_64
4049 - name : Build
4150 run : |
42- QT_DIR=$(ls -d /Library/Developer/Qt-*-OpenSSL | tail -n 1)
4351 cmake "-GNinja" \
44- -DCMAKE_PREFIX_PATH=${QT_DIR} \
45- -DOPENSSL_ROOT_DIR=/Library/Developer/OpenSSL \
46- -DLDAP_ROOT=/Library/Developer/OpenLDAP \
52+ -DOPENSSL_ROOT_DIR=${PWD}/cache/OpenSSL \
53+ -DLDAP_ROOT=${PWD}/cache/OpenLDAP \
4754 -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -B build -S .
48- cmake --build build --target zipdebug macdeployqt zip
55+ cmake --build build
56+ cmake --build build --target zipdebug
57+ cmake --build build --target macdeployqt
58+ cmake --build build --target zip
4959 - name : Archive artifacts
5060 uses : actions/upload-artifact@v4
5161 with :
@@ -150,25 +160,32 @@ jobs:
150160 run : |
151161 Rename-Item "libdigidocpp*.msi" libdigidocpp.msi
152162 msiexec /qn /i libdigidocpp.msi
163+ - name : Cache vcpkg
164+ uses : actions/cache@v4
165+ with :
166+ path : ${{ github.workspace }}/vcpkg_cache
167+ key : vcpkg-${{ matrix.vcver }}-${{ hashFiles('.github/workflows/*', 'vcpkg.json') }}
153168 - name : Prepare vcpkg
154- uses : lukka/run-vcpkg@v7
169+ uses : lukka/run-vcpkg@v11
155170 with :
156- vcpkgArguments : openssl zlib flatbuffers
157- vcpkgGitCommitId : 031ad89ce6c575df35a8e58707ad2c898446c63e
158- vcpkgTriplet : x64-windows
171+ vcpkgGitCommitId : 98e7cd3a7ba579efc543f8854af800d033031eae
172+ vcpkgJsonGlob : ./vcpkg.json
173+ runVcpkgInstall : true
174+ env :
175+ VCPKG_BINARY_SOURCES : clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
159176 - name : Install Qt
160177 uses : jurplel/install-qt-action@v4
161178 with :
162- version : 6.9.1
179+ version : 6.9.2
163180 arch : win64_msvc2022_64
164181 - name : Setup dev env
165182 uses : ilammy/msvc-dev-cmd@v1
166183 with :
167184 arch : x64
168185 - name : Install WiX
169186 run : |
170- dotnet tool install -g wix --version 6.0.1
171- wix extension -g add WixToolset.UI.wixext/6.0.1
187+ dotnet tool install -g wix --version 6.0.2
188+ wix extension -g add WixToolset.UI.wixext/6.0.2
172189 - name : Build
173190 run : |
174191 cmake "-GNinja" -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo `
0 commit comments