OpenXR SDK 1.1.41 #597
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: Rust | |
on: | |
push: | |
branches: [master, alxr-workflows, alxr-uwp-workflows, facial-eye-tracking] | |
pull_request: | |
branches: [master, alxr-workflows, alxr-uwp-workflows, facial-eye-tracking] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_windows: | |
runs-on: windows-2019 | |
env: | |
LIBCLANG_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build crates | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -p alvr_xtask -p alvr_server -p alvr_launcher --verbose | |
build_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build and install dependencies | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
sudo apt update | |
sudo apt install build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libgtk-3-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit | |
cp packaging/deb/cuda.pc /usr/share/pkgconfig | |
cargo xtask build-ffmpeg-linux | |
cd deps/linux/FFmpeg-release-5.1 && sudo make install && cd ../../.. | |
- name: Build crates | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -p alvr_xtask -p alvr_launcher -p alvr_server -p alvr_vulkan-layer -p vrcompositor-wrapper --verbose | |
build_alxr_win_x64: | |
runs-on: windows-2022 | |
env: | |
RUST_BACKTRACE: 1 | |
NINJA_HOME: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: "false" | |
- uses: humbletim/[email protected] | |
with: | |
vulkan-query-version: latest | |
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang | |
vulkan-use-cache: true | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
method: 'network' | |
cuda: '12.4.1' | |
# sub-packages: '["nvcc", "visual_studio_integration"]' | |
- name: Install Depends & Build | |
run: | | |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
$env:Path="$env:NINJA_HOME;$env:Path" | |
# Fetch alxr-engine submodule. | |
git submodule update --init --recursive | |
cargo build -p alxr-client --verbose --features cuda-interop | |
build_alxr_uwp_arm64: | |
runs-on: windows-2022 | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: "false" | |
- name: Install ALXR Tools/Dependencies | |
run: | | |
# Fetch alxr-engine submodule. | |
git submodule update --init --recursive | |
Start-Process -FilePath .\alvr\openxr-client\alxr-client\uwp\install_uwp_toolchain.bat -Wait -NoNewWindow | |
rustup toolchain install nightly-2024-07-19 | |
rustup component add rust-src --toolchain nightly-2024-07-19-x86_64-pc-windows-msvc | |
rustup update | |
- name: Build Debug UWP aarch64/arm64 | |
run: | | |
cargo +nightly-2024-07-19 build -Z build-std=std,panic_abort -p alxr-client-uwp --target aarch64-uwp-windows-msvc --verbose | |
build_alxr_linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: "false" | |
- name: Build and install dependencies | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
sudo apt update && sudo apt upgrade -y | |
# ALVR/FFMPEG specific depends. | |
sudo apt install build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libgtk-3-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit | |
# ALXR specific depends. | |
sudo apt install git ninja-build libxxf86vm-dev libxcb-glx0-dev libcjson-dev glslang-dev glslang-tools -y | |
cp packaging/deb/cuda.pc /usr/share/pkgconfig | |
cargo xtask build-ffmpeg-linux | |
cd deps/linux/FFmpeg-release-5.1 && sudo make install && cd ../../.. | |
# Fetch alxr-engine submodule. | |
git submodule update --init --recursive | |
- name: Build crates | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -p alxr-client --verbose --features cuda-interop | |
build_alxr_linux_portable: | |
# ubuntu-20.04 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: "false" | |
- name: Build and install dependencies | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
sudo apt update # && sudo apt upgrade -y | |
# ALVR/FFMPEG specific depends. | |
sudo apt install build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libgtk-3-dev libunwind-dev | |
# ALXR specific depends. | |
sudo apt install git wget gcc-10 g++-10 ninja-build libxxf86vm-dev libxcb-glx0-dev libcjson-dev glslang-dev glslang-tools -y | |
# ubuntu-focal cmake package is too old... | |
CMAKE_FILE=cmake-3.27.7-linux-x86_64.sh | |
wget https://github.com/Kitware/CMake/releases/download/v3.27.7/${CMAKE_FILE} | |
chmod +x ${CMAKE_FILE} | |
./${CMAKE_FILE} --skip-license --include-subdir | |
export PATH=${PWD}/cmake-3.27.7-linux-x86_64:$PATH | |
# ubuntu-focal glslang package is too old... | |
wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip | |
unzip glslang-master-linux-Release.zip -d glslang | |
export PATH=${PWD}/glslang/bin:$PATH | |
export CC=/usr/bin/gcc-10 | |
export CXX=/usr/bin/g++-10 | |
# Fetch alxr-engine submodule. | |
git submodule update --init --recursive | |
echo "$PATH" >> $GITHUB_PATH | |
- name: Build crates | |
env: | |
CC: /usr/bin/gcc-10 | |
CXX: /usr/bin/g++-10 | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask build-alxr-client --release --bundle-ffmpeg --gpl --no-nvidia --ffmpeg-version=release/4.4 | |
build_alxr_android: | |
runs-on: ubuntu-22.04 | |
env: | |
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/27.1.12297006 | |
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/27.1.12297006 | |
ANDROID_CMAKE_BIN: /usr/local/lib/android/sdk/cmake/3.30.3/bin | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: "false" | |
- name: Prepare android deps | |
run: | | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install gcc-multilib | |
SDK_MANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager | |
yes | sudo $SDK_MANAGER --install "ndk;27.1.12297006" "platforms;android-29" "cmake;3.30.3" | |
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android | |
cargo install cargo-apk --git https://github.com/korejan/cargo-apk.git --branch android-manifest-entries | |
# Fetch alxr-engine submodule. | |
git submodule update --init --recursive | |
- name: Build alxr-android-generic | |
run: | | |
unset ANDROID_HOME | |
JAVA_HOME=$JAVA_HOME_17_X64 | |
export PATH=$ANDROID_CMAKE_BIN:$PATH | |
cargo apk build -p alxr-client-android | |
- name: Build alxr-android-pico | |
run: | | |
unset ANDROID_HOME | |
JAVA_HOME=$JAVA_HOME_17_X64 | |
export PATH=$ANDROID_CMAKE_BIN:$PATH | |
cargo apk build -p alxr-client-pico --target-dir=target/pico | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: -p alvr_session --verbose | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: windows-2019 | |
env: | |
LIBCLANG_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: Swatinem/rust-cache@v1 | |
- uses: ErichDonGubler/clippy-check@fix-windows-lf-breaking-reports | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: -p alvr_xtask -p alvr_common -p alvr_server -p alvr_launcher |