-
Notifications
You must be signed in to change notification settings - Fork 27
49 lines (40 loc) · 1.46 KB
/
cmake.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
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libxcb-keysyms1-dev libxcb1-dev libxcb-xfixes0-dev libxcb-cursor-dev libxcb-xkb-dev libxcb-glx0-dev libxcb-randr0-dev libx11-xcb-dev libglew-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 8
- name: Pack
run: |
if ("${{ matrix.os }}" -eq "windows-latest") {
$fileName = "openxr-explorer-win-x64.zip"
$paths = $(Join-Path "build" "Release" "openxr-explorer.exe"), $(Join-Path "build" "Release" "xrsetruntime.exe")
} else {
$fileName = "openxr-explorer-linux-x64.zip"
$paths = $(Join-Path "build" "openxr-explorer"), $(Join-Path "build" "xrsetruntime")
}
Compress-Archive -Force -Path $paths -DestinationPath $fileName
shell: pwsh
- name: Publish
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: "*.zip"