Prebuild vcpkg #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Prebuild vcpkg" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * 1,3,5' | |
env: | |
BUILD_TYPE: Release | |
X_VCPKG_NUGET_ID_PREFIX: 'colorer' | |
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | |
jobs: | |
windows-vc: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ x64, x86 ] | |
logger: [ON] | |
icu: [ON] | |
zip: [ON] | |
include: | |
- arch: x64 | |
triplet: x64-windows-static-rel | |
- arch: x86 | |
triplet: x86-windows-static-rel | |
name: windows-${{ matrix.arch }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# fetch all for vcpkg versions functionality | |
fetch-depth: 0 | |
- name: Install vcpkg | |
run: | | |
cd external\vcpkg | |
.\bootstrap-vcpkg.bat | |
- name: Add C++ build tools to PATH | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: Setup NuGet Credentials for vpckg cache | |
shell: bash | |
run: > | |
`$GITHUB_WORKSPACE/external/vcpkg/vcpkg fetch nuget | tail -n 1` | |
sources add | |
-source "https://nuget.pkg.github.com/colorer/index.json" | |
-storepasswordincleartext | |
-name "GitHub" | |
-username "${{ secrets.PACKAGES_GITHUB_USER }}" | |
-password "${{ secrets.PACKAGES_GITHUB_TOKEN }}" | |
- name: Create Build folder | |
run: mkdir -p _build | |
- name: Configure CMake | |
shell: bash | |
# add -DVCPKG_INSTALL_OPTIONS="--debug" for debug output | |
run: > | |
cmake -S . -B _build -G "Ninja" | |
-DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
-DCOLORER_BUILD_TEST=OFF | |
-DCOLORER_BUILD_ARCH=${{ matrix.arch }} | |
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/vcpkg/scripts/buildsystems/vcpkg.cmake | |
-DVCPKG_OVERLAY_PORTS=$GITHUB_WORKSPACE/external/vcpkg-ports | |
-DVCPKG_OVERLAY_TRIPLETS=$GITHUB_WORKSPACE/external/vcpkg-triplets | |
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} | |
-DVCPKG_FEATURE_FLAGS=manifests,versions | |
-DCOLORER_USE_ICU_STRINGS=${{ matrix.icu }} | |
-DCOLORER_USE_ZIPINPUTSOURCE=${{ matrix.zip }} | |
# dependencies are being built at the configuration stage |