Skip to content

Build

Build #8

Workflow file for this run

name: Build
on:
workflow_dispatch:
workflow_call:
jobs:
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Download Banjo toolchain
run: Invoke-WebRequest -OutFile banjo-x86_64-windows.zip https://github.com/chnoblouch/banjo-lang/releases/latest/download/banjo-x86_64-windows.zip
- name: Extract Banjo toolchain
run: Expand-Archive .\banjo-x86_64-windows.zip $ENV:USERPROFILE
- name: Add Banjo toolchain to PATH
run: echo "$ENV:USERPROFILE\banjo-x86_64-windows\bin" | Out-File -FilePath $ENV:GITHUB_PATH -Encoding utf8 -Append
- name: Install libclang
run: pip install libclang
- name: Build OpenXR runtime
working-directory: "${{ github.workspace }}/openxr_runtime"
run: banjo build
- name: Build camera capture library
working-directory: "${{ github.workspace }}/camera_capture"
run: banjo build
- name: Build display surface library
working-directory: "${{ github.workspace }}/display_surface"
run: banjo build
- name: Install pyinstaller
run: pip install pyinstaller
- name: Set up tracker venv
working-directory: "${{ github.workspace }}/tracker"
run: |
python -m venv venv
./venv/Scripts/pip install -r requirements.txt
- name: Create tracker build directory
run: mkdir "${{ github.workspace }}/tracker/build"
- name: Package tracker
working-directory: "${{ github.workspace }}/tracker/build"
run: pyinstaller --paths ..\venv\Lib\site-packages\ --windowed --icon NONE ..\aethervr_tracker.py
- name: Package
run: |
mkdir aethervr-x86_64-windows
cp openxr_runtime/out/x86_64-windows-msvc-debug/aethervr.dll aethervr-x86_64-windows/aethervr.dll
cp openxr_runtime/openxr_runtime.json aethervr-x86_64-windows/openxr_runtime.json
cp camera_capture/out/x86_64-windows-msvc-debug/aethervr_camera_capture.dll aethervr-x86_64-windows/aethervr_camera_capture.dll
cp display_surface/out/x86_64-windows-msvc-debug/aethervr_display_surface.dll aethervr-x86_64-windows/aethervr_display_surface.dll
cp tracker/build/dist/aethervr_tracker/aethervr_tracker.exe aethervr-x86_64-windows/aethervr_tracker.exe
cp -r tracker/build/dist/aethervr_tracker/_internal aethervr-x86_64-windows/_internal
7z a aethervr-x86_64-windows.zip aethervr-x86_64-windows
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-x86_64-windows
path: aethervr-x86_64-windows.zip