Repository navigation
120 lines (98 loc) · 3.15 KB
/
Copy pathbuild.yml
File metadata and controls
120 lines (98 loc) · 3.15 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build artifacts for PRs
on:
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: crazy-max/ghaction-chocolatey@v4
with:
args: install zip unzip pkgconfiglite
- name: Prepare deps
env:
RUST_BACKTRACE: 1
run: cargo xtask prepare-deps --platform windows
- name: Build and package ALVR (.zip)
env:
RUST_BACKTRACE: 1
run: |
mkdir artifacts/
cargo xtask build-streamer --platform windows --ci
zip -r9X artifacts/alvr_streamer_windows.zip ./build/alvr_streamer*
cargo xtask build-launcher --platform windows --ci
zip -r9X artifacts/alvr_launcher_windows.zip ./build/alvr_launcher*
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Windows packages
path: ./artifacts/*
build-linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libasound2-dev libxrandr-dev libunwind-dev libgtk-3-dev libpipewire-0.3-dev libspa-0.2-dev
- name: Prepare deps
env:
RUST_BACKTRACE: 1
run: cargo xtask prepare-deps --platform linux
- name: Build and package ALVR (.tar.gz)
env:
RUST_BACKTRACE: 1
run: |
set -e
mkdir artifacts/
cargo xtask build-streamer --platform linux --ci
tar -cJf artifacts/alvr_streamer_linux.tar.xz ./build/alvr_streamer*
cargo xtask build-launcher --platform linux --ci
tar -cJf artifacts/alvr_launcher_linux.tar.xz ./build/alvr_launcher*
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Linux packages
path: ./artifacts/*
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "17"
- uses: android-actions/setup-android@v4
with:
packages: "platforms;android-32"
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26b
- name: Prepare deps
env:
RUST_BACKTRACE: 1
run: cargo xtask prepare-deps --platform android
- name: Build client
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
working-directory: ./alvr/client_openxr
run: cargo xtask build-client
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Android APK
path: ./build/alvr_client_android/alvr_client_android.apk