-
Notifications
You must be signed in to change notification settings - Fork 19
62 lines (62 loc) · 1.85 KB
/
ci.yaml
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
name: Toolchain CI
on:
pull_request:
push:
branches:
- main
paths-ignore:
- '.editorconfig'
- '.vscode/**'
- '*.md'
workflow_dispatch:
jobs:
analyze:
name: Run 'cmake-lint'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install 'cmakelang[YAML]'
shell: pwsh
run: |
& pip install cmakelang[YAML]
- name: CMake lint
shell: pwsh
run: |
& ./analyze.ps1
build:
name: Build Examples
strategy:
max-parallel: 8
fail-fast: false
matrix:
configuration: [ Debug, Release ]
buildPreset: [ windows-msvc-x64, windows-msvc-amd64, windows-msvc-x86, windows-msvc-arm64, windows-clang-x64, windows-clang-amd64, windows-clangcl-x64, windows-clangcl-amd64 ]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ninja
shell: pwsh
run: |
choco install ninja
- name: CMake Configure ${{ matrix.buildPreset }}
shell: pwsh
run: |
Set-Location ./example
cmake --preset ${{ matrix.buildPreset }}
- name: CMake Build ${{ matrix.buildPreset }}
shell: pwsh
run: |
Set-Location ./example
cmake --build --preset ${{ matrix.buildPreset }} --config ${{ matrix.configuration }}
- name: Upload output artifact
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: __output_${{ matrix.buildPreset }}_${{ matrix.configuration }}
path: |
example/__output/${{ matrix.buildPreset }}
!example/__output/${{ matrix.buildPreset }}/**/*.ilk
!example/__output/${{ matrix.buildPreset }}/**/*.obj
!example/__output/${{ matrix.buildPreset }}/**/*.pch