Skip to content

Prebuild vcpkg

Prebuild vcpkg #21

Workflow file for this run

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:
build: [ x64, x86 , ARM64 ]
include:
- { build: x64, arch: amd64, triplet: x64-windows-static-rel, }
- { build: x86, arch: amd64_x86, triplet: x86-windows-static-rel, }
- { build: ARM64, arch: amd64_arm64, triplet: arm64-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\colorer\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/colorer/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_ARCH=${{ matrix.build }}
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/external/colorer/external/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
-DVCPKG_OVERLAY_PORTS=$GITHUB_WORKSPACE/external/colorer/external/vcpkg-ports
-DVCPKG_OVERLAY_TRIPLETS=$GITHUB_WORKSPACE/external/colorer/external/vcpkg-triplets
-DVCPKG_FEATURE_FLAGS=manifests,versions
# dependencies are being built at the configuration stage