-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (46 loc) · 1.66 KB
/
build.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
name: Build Feeder App
on: [push, workflow_dispatch]
jobs:
job:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
# shallow clone doesn't pull tags, unfortunately.
fetch-depth: 0
- uses: lukka/get-cmake@latest
- name: vcpkg setup/restore artifacts
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Prints output of run-vcpkg's action.
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
- name: Setup vcpkg env
run: vcpkg env
shell: cmd
if: matrix.os == 'windows-latest'
- name: CMake+vcpkg configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: cmake --build build --config RelWithDebInfo
- name: Package
run: cmake --build build --target package --config RelWithDebInfo
- name: Get package path for Artifact
run: echo "artifactPath=$(realpath build/_CPack_Packages/*/ZIP/SlimeVR-Feeder-App-*/ --relative-to .)" >> $GITHUB_ENV
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.artifactPath }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/SlimeVR-Feeder-App-*.zip