-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 2.02 KB
/
build.yml
File metadata and controls
56 lines (56 loc) · 2.02 KB
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
name: Build all
on: [push, pull_request]
permissions:
packages: write
jobs:
populate-vcpkg-cache:
uses: ./.github/workflows/populate-vcpkg-cache.yaml
with:
arch: ${{matrix.arch}}
strategy:
matrix:
arch: [x86, x64]
build:
needs: populate-vcpkg-cache
strategy:
matrix:
arch: [ x86, x64 ]
kind: [ Debug, RelWithDebInfo ]
name: Build - ${{matrix.arch}}-${{ matrix.kind }}
runs-on: windows-2022
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
submodules: true
- uses: ./.github/actions/configure-environment
with:
arch: ${{matrix.arch}}
github_token: ${{secrets.GITHUB_TOKEN}}
- name: Configure
shell: pwsh
run: |
cmake -S . -B build -G Ninja `
-DCMAKE_BUILD_TYPE=${{matrix.kind}} `
-DVCPKG_TARGET_TRIPLET=${{matrix.arch}}-windows-static `
"-DCMAKE_TOOLCHAIN_FILE=third-party/vcpkg/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$(pwd)/build/output/bin" `
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$(pwd)/build/output/bin" `
"-DCMAKE_PDB_OUTPUT_DIRECTORY=$(pwd)/build/output/pdb" `
-DPROJECT_VERSION_TWEAK=${{github.run_number}} `
"-DBUILD_METADATA=gha.${{github.run_number}}" `
"-DSOURCELINK=https://raw.githubusercontent.com/${{github.repository}}/${{github.sha}}"
- name: Build
run: cmake --build build --config ${{matrix.kind}} --parallel
- name: Make copyright notice file
shell: pwsh
run: |
.github/workflows/make-copyright-notices-file.ps1 `
-OutputFile build/output/bin/copyright-notices.txt `
-Arch ${{matrix.arch}} `
-BuildDir build
- name: Upload artifacts
if: matrix.kind != 'Debug'
uses: actions/upload-artifact@v6
with:
name: wintab-adapter-gha${{github.run_number}}-${{matrix.arch}}
path: build/output