-
Notifications
You must be signed in to change notification settings - Fork 17
70 lines (58 loc) · 1.93 KB
/
prebuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "Prebuild vcpkg"
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1,3,5'
env:
BUILD_TYPE: Release
X_VCPKG_NUGET_ID_PREFIX: 'farcolorer'
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 }
- { build: x86, arch: amd64_x86 }
- { build: arm64, arch: amd64_arm64 }
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
-DFARCOLORER_LEGACY=OFF
# dependencies are being built at the configuration stage