Fix build with -Werror=format-security (#24) #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |