-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (74 loc) · 2.84 KB
/
build-pipeline.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
71
72
73
74
name: Build Pipeline
on:
push:
branches:
- development
paths-ignore:
- ".clang-format"
- ".clang-tidy"
- ".editorconfig"
- ".gitignore"
- "README.md"
pull_request:
branches:
- development
paths-ignore:
- ".clang-format"
- ".clang-tidy"
- ".editorconfig"
- ".gitignore"
- "README.md"
jobs:
build:
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_DISABLE_METRICS: ON
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
include:
- mono: "mono"
os: "macos-latest"
triplet: "x64-osx"
- mono: "mono"
os: "ubuntu-latest"
triplet: "x64-linux"
- mono: ""
os: "windows-latest"
triplet: "x64-windows"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Install doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.9.7"
- name: Install ninja
uses: daehlith/ninja-install@v1
- name: Checkout
uses: actions/checkout@v3
- name: "Setup NuGet Credentials"
run: |
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Setup MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
run: cmake --preset "ninja-multi-config" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build --preset "ninja-multi-config-release"
- name: Test
run: ctest --preset "ninja-multi-config-release"