-
Notifications
You must be signed in to change notification settings - Fork 7
923 lines (824 loc) · 35 KB
/
nightly-release.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
name: Release ALXR nightly
env:
CARGO_TERM_COLOR: always
on:
workflow_dispatch:
schedule:
- cron: "0 22 * * *"
jobs:
prepare_release:
runs-on: windows-2022
outputs:
release_ref: ${{ steps.output_ref.outputs.release_ref }}
upload_url: ${{ steps.create_alxr_release.outputs.upload_url }}
release_id: ${{ steps.create_alxr_release.outputs.id }}
steps:
- uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Generate tag, set release ref
id: output_ref
env:
RUST_BACKTRACE: 1
run: |
$out = cargo xtask bump-alxr-versions --nightly
echo $out
echo "::set-output name=version_tag::$(echo $out | sls -CaseSensitive -Pattern '^v.*$')"
echo "::set-output name=release_ref::$(git rev-parse HEAD)"
- name: Create ALXR Release
id: create_alxr_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Release tag is taken from the gen_tag job.
tag_name: ${{ steps.output_ref.outputs.version_tag }}
release_name: ${{ steps.output_ref.outputs.version_tag }}
# TODO: gather commit output_ref to post here in the body
body: |
Nightly release of ALXR: ${{ steps.output_ref.outputs.version_tag }}
Generated from commit: korejan/ALVR@${{ steps.output_ref.outputs.release_ref }}
**Please note:**
**only server builds here are compatible.**
**client v0.41 and above must be used with server v18.15 and above**
**alxr-client.apk for any android based headset except Pico (install alxr-client-pico.apk instead)**
draft: true
prerelease: false
build_windows_server:
runs-on: windows-2022
needs: [prepare_release]
env:
# For bindgen to find libclang.dll, we need to give it the path to the Visual Studio package.
# This is specific to the GitHub windows-2019 runner.
LIBCLANG_PATH: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/libclang.dll'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: v18-server-mod
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup update
- uses: Swatinem/rust-cache@v2
with:
cache-targets: "false"
- name: Download WiX 3.14 binaries
run: |
Invoke-WebRequest https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314-binaries.zip -OutFile wix314-binaries.zip
Expand-Archive -Path wix314-binaries.zip -DestinationPath wix314-binaries/bin
- name: Build and package ALVR (.zip, .exe)
id: build
env:
WIX: "wix314-binaries"
RUST_BACKTRACE: 1
run: |
cargo xtask build-windows-deps
cargo xtask publish-server --gpl
$file = Get-ChildItem -Name .\build\*.exe | Select-Object -f 1
echo "::set-output name=exe_filename::$file"
# Assets upload: .exe, .zip
- name: Upload Windows installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/${{ steps.build.outputs.exe_filename }}
asset_name: ${{ steps.build.outputs.exe_filename }}
asset_content_type: application/octet-stream
- name: Upload portable server for Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alvr_server_windows.zip
asset_name: alvr_server_windows.zip
asset_content_type: application/zip
# build_linux_server:
# runs-on: ubuntu-22.04
# needs: [prepare_release]
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# repository: "korejan/ALVR"
# ref: v18-server-mod
# - 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
# # 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
# - name: Build and package ALVR (.tar.gz)
# id: build
# env:
# RUST_BACKTRACE: 1
# run: |
# cargo xtask build-server --release --bundle-ffmpeg --gpl
# tar -czvf ./build/alvr_server_linux.tar.gz -C ./build/alvr_server_linux .
# - name: Upload portable server for Linux
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.prepare_release.outputs.upload_url }}
# asset_path: ./build/alvr_server_linux.tar.gz
# asset_name: alvr_server_linux.tar.gz
# asset_content_type: application/gzip
build_alxr_linux_portable_release:
runs-on: ubuntu-20.04
needs: [prepare_release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- 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 & Package ALXR-Release (.tar.gz)
id: build-release
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
RUST_BACKTRACE: 1
run: |
cargo xtask bump-alxr-versions --nightly
cargo xtask build-alxr-client --release --bundle-ffmpeg --gpl --no-nvidia --ffmpeg-version=release/4.4
tar -czvf ./build/alxr-client-linux.tar.gz -C ./build/release/alxr_client_linux .
- name: Upload portable alxr-release for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-linux.tar.gz
asset_name: alxr-client-linux.tar.gz
asset_content_type: application/gzip
build_alxr_linux_portable_debug:
runs-on: ubuntu-20.04
needs: [prepare_release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- 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 & Package ALXR-Debug (.tar.gz)
id: build-debug
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
RUST_BACKTRACE: 1
run: |
cargo xtask bump-alxr-versions --nightly
cargo xtask build-alxr-client --bundle-ffmpeg --gpl --no-nvidia --ffmpeg-version=release/4.4
tar -czvf ./build/alxr-client-linux-debug.tar.gz -C ./build/debug/alxr_client_linux .
- name: Upload portable alxr-debug for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-linux-debug.tar.gz
asset_name: alxr-client-linux-debug.tar.gz
asset_content_type: application/gzip
build_alxr_linux_release:
runs-on: ubuntu-22.04
needs: [prepare_release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build and install ALXR 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
# Fetch alxr-engine submodule.
git submodule update --init --recursive
- name: Build & Package ALXR-Release ubuntu-22.04 (.tar.gz)
id: build-release
env:
RUST_BACKTRACE: 1
run: |
cargo xtask bump-alxr-versions --nightly
# without nvidia/cuda
cargo xtask build-alxr-client --release --bundle-ffmpeg --gpl --no-nvidia --ffmpeg-version=release/5.1
tar -czvf ./build/alxr-client-ubuntu-22.04-no-nvidia.tar.gz -C ./build/release/alxr_client_linux .
# with nvidia/cuda
cargo xtask build-alxr-client --release --bundle-ffmpeg --gpl --ffmpeg-version=release/5.1
tar -czvf ./build/alxr-client-ubuntu-22.04.tar.gz -C ./build/release/alxr_client_linux_cuda .
- name: Upload ubuntu-22.04 alxr-release for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-ubuntu-22.04.tar.gz
asset_name: alxr-client-ubuntu-22.04.tar.gz
asset_content_type: application/gzip
- name: Upload ubuntu-22.04 alxr-release-no-nvidia for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-ubuntu-22.04-no-nvidia.tar.gz
asset_name: alxr-client-ubuntu-22.04-no-nvidia.tar.gz
asset_content_type: application/gzip
build_alxr_linux_debug:
runs-on: ubuntu-22.04
needs: [prepare_release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build and install ALXR 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
# Fetch alxr-engine submodule.
git submodule update --init --recursive
- name: Build & Package ALXR-Debug ubuntu-22.04 (.tar.gz)
id: build-debug
env:
RUST_BACKTRACE: 1
run: |
cargo xtask bump-alxr-versions --nightly
# without nvidia/cuda
cargo xtask build-alxr-client --bundle-ffmpeg --gpl --no-nvidia --ffmpeg-version=release/5.1
tar -czvf ./build/alxr-client-ubuntu-22.04-no-nvidia-debug.tar.gz -C ./build/debug/alxr_client_linux .
# with nvidia/cuda
cargo xtask build-alxr-client --bundle-ffmpeg --gpl --ffmpeg-version=release/5.1
tar -czvf ./build/alxr-client-ubuntu-22.04-debug.tar.gz -C ./build/debug/alxr_client_linux_cuda .
- name: Upload ubuntu-22.04 alxr-debug for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-ubuntu-22.04-debug.tar.gz
asset_name: alxr-client-ubuntu-22.04-debug.tar.gz
asset_content_type: application/gzip
- name: Upload ubuntu-22.04 alxr-debug-no-nvidia for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-ubuntu-22.04-no-nvidia-debug.tar.gz
asset_name: alxr-client-ubuntu-22.04-no-nvidia-debug.tar.gz
asset_content_type: application/gzip
build_alxr_android_release:
runs-on: ubuntu-22.04
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/27.0.12077973
ANDROID_NDK_HOME: $ANDROID_NDK_ROOT
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup update
- uses: Swatinem/rust-cache@v2
with:
cache-targets: "false"
- name: Build / Install ALXR Android dependencies
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.0.12077973" "platforms;android-29"
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
cargo xtask bump-alxr-versions --nightly
- name: Build & Package alxr-android-generic-release
run: |
unset ANDROID_HOME
JAVA_HOME=$JAVA_HOME_17_X64
cargo xtask build-alxr-android --generic --release
cargo clean
- name: Build & Package alxr-android-pico-release
run: |
unset ANDROID_HOME
JAVA_HOME=$JAVA_HOME_17_X64
cargo xtask build-alxr-pico --release
cargo clean
- name: Upload alxr-android-generic-release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/release/alxr_client_android/alxr-client.apk
asset_name: alxr-client.apk
asset_content_type: application/vnd.android.package-archive
- name: Upload alxr-android-pico-release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/release/alxr_client_android/alxr-client-pico.apk
asset_name: alxr-client-pico.apk
asset_content_type: application/vnd.android.package-archive
build_alxr_android_debug:
runs-on: ubuntu-22.04
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/27.0.12077973
ANDROID_NDK_HOME: $ANDROID_NDK_ROOT
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup update
- uses: Swatinem/rust-cache@v2
with:
cache-targets: "false"
- name: Build / Install ALXR Android dependencies
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.0.12077973" "platforms;android-29"
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
cargo xtask bump-alxr-versions --nightly
- name: Build & Package alxr-android-generic-debug
run: |
unset ANDROID_HOME
JAVA_HOME=$JAVA_HOME_17_X64
cargo xtask build-alxr-android --generic
pushd ./build/debug/alxr_client_android
mv alxr-client.apk alxr-client-debug.apk
popd
cargo clean
- name: Build & Package alxr-android-pico-debug
run: |
unset ANDROID_HOME
JAVA_HOME=$JAVA_HOME_17_X64
cargo xtask build-alxr-pico
pushd ./build/debug/alxr_client_android
mv alxr-client-pico.apk alxr-client-pico-debug.apk
popd
cargo clean
- name: Upload alxr-android-generic-debug
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/debug/alxr_client_android/alxr-client-debug.apk
asset_name: alxr-client-debug.apk
asset_content_type: application/vnd.android.package-archive
- name: Upload alxr-android-pico-debug
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/debug/alxr_client_android/alxr-client-pico-debug.apk
asset_name: alxr-client-pico-debug.apk
asset_content_type: application/vnd.android.package-archive
build_libalxr_win_x64_release:
runs-on: windows-2022
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
NINJA_HOME: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
# - 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.1.0'
- name: Build and install LibALXR dependencies
run: |
# Fetch alxr-engine submodule.
git submodule update --init --recursive
- name: Build & Package LibALXR-Release win-x64 (.zip)
id: build-release
run: |
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
$env:Path="$env:NINJA_HOME;$env:Path"
cd alvr/openxr-client/alxr-engine-sys
Invoke-Expression -Command "./build_libalxr.bat"
cd ../../../build/libalxr/bin
7z a -tzip ../../libalxr-win-x64.zip .
cd ../../../
- name: Upload libalxr-release win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/libalxr-win-x64.zip
asset_name: libalxr-win-x64.zip
asset_content_type: application/zip
build_alxr_win_x64_release:
runs-on: windows-2022
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
NINJA_HOME: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- 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.2.0'
# sub-packages: '["nvcc", "visual_studio_integration"]'
- name: Build and install ALXR dependencies
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
# Fetch alxr-engine submodule.
git submodule update --init --recursive
- name: Build & Package ALXR-Release win-x64 (.zip)
id: build-release
run: |
$env:Path="$env:NINJA_HOME;$env:Path"
cargo xtask bump-alxr-versions --nightly
# without nvidia/cuda
cargo xtask build-alxr-client --release --no-nvidia
7z a -tzip .\build\alxr-client-win-x64-no-nvidia.zip .\build\release\alxr_client_windows
# with nvidia/cuda
cargo xtask build-alxr-client --release
7z a -tzip .\build\alxr-client-win-x64.zip .\build\release\alxr_client_windows_cuda
- name: Upload alxr-release win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-win-x64.zip
asset_name: alxr-client-win-x64.zip
asset_content_type: application/zip
- name: Upload alxr-release-no-nvidia win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-win-x64-no-nvidia.zip
asset_name: alxr-client-win-x64-no-nvidia.zip
asset_content_type: application/zip
build_alxr_win_x64_debug:
runs-on: windows-2022
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
NINJA_HOME: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- 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.2.0'
# sub-packages: '["nvcc", "visual_studio_integration"]'
- name: Build and install ALXR dependencies
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
# Fetch alxr-engine submodule.
git submodule update --init --recursive
- name: Build & Package ALXR-Debug win-x64 (.zip)
id: build-debug
env:
RUST_BACKTRACE: 1
run: |
$env:Path="$env:NINJA_HOME;$env:Path"
cargo xtask bump-alxr-versions --nightly
# without nvidia/cuda
cargo xtask build-alxr-client --no-nvidia
7z a -tzip .\build\alxr-client-win-x64-no-nvidia-debug.zip .\build\debug\alxr_client_windows
# with nvidia/cuda
cargo xtask build-alxr-client
7z a -tzip .\build\alxr-client-win-x64-debug.zip .\build\debug\alxr_client_windows_cuda
- name: Upload alxr-debug win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-win-x64-debug.zip
asset_name: alxr-client-win-x64-debug.zip
asset_content_type: application/zip
- name: Upload alxr-debug-no-nvidia win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ./build/alxr-client-win-x64-no-nvidia-debug.zip
asset_name: alxr-client-win-x64-no-nvidia-debug.zip
asset_content_type: application/zip
build_uwp_app_bundle_debug:
runs-on: windows-2022
needs: [prepare_release]
env:
RUST_BACKTRACE: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- 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
cargo xtask bump-alxr-versions --nightly
- name: Build & Package UWP Arm64 Debug (.msix)
run: cargo xtask build-alxr-uwp-arm64
- name: Build & Package UWP x64 Debug (.msix)
run: cargo xtask build-alxr-uwp-x64
- name: Build Debug UWP App-bundle (.msixbundle)
id: app_bundle_debug
run: |
cargo xtask build-alxr-app-bundle
$ALXR_MSIX_BUNDLE_PATH=(cmd /C dir /S /B .\build\debug\alxr_client_uwp\alxr-client-uwp_*.msixbundle)
$ALXR_MSIX_BUNDLE_FILE=(cmd /C dir /B .\build\debug\alxr_client_uwp\alxr-client-uwp_*.msixbundle)
echo "::set-output name=alxr_msixbundle_path::$ALXR_MSIX_BUNDLE_PATH"
echo "::set-output name=alxr_msixbundle_file::$ALXR_MSIX_BUNDLE_FILE"
- name: Upload Debug UWP App-bundle (.msixbundle)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ${{ steps.app_bundle_debug.outputs.alxr_msixbundle_path }}
asset_name: ${{ steps.app_bundle_debug.outputs.alxr_msixbundle_file }}
asset_content_type: application/zip
build_uwp_app_bundle_release:
runs-on: windows-2022
needs: [prepare_release]
outputs:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
release_ref: ${{ needs.prepare_release.outputs.release_ref }}
env:
RUST_BACKTRACE: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
- 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
cargo xtask bump-alxr-versions --nightly
- name: Build & Package UWP Arm64 Release (.msix)
run: cargo xtask build-alxr-uwp-arm64 --release
- name: Build & Package UWP x64 Release (.msix)
run: cargo xtask build-alxr-uwp-x64 --release
- name: Build Release UWP App-bundle (.msixbundle)
id: app_bundle_release
run: |
cargo xtask build-alxr-app-bundle --release
$ALXR_MSIX_BUNDLE_PATH=(cmd /C dir /S /B .\build\release\alxr_client_uwp\alxr-client-uwp_*.msixbundle)
$ALXR_MSIX_BUNDLE_FILE=(cmd /C dir /B .\build\release\alxr_client_uwp\alxr-client-uwp_*.msixbundle)
echo "::set-output name=alxr_msixbundle_path::$ALXR_MSIX_BUNDLE_PATH"
echo "::set-output name=alxr_msixbundle_file::$ALXR_MSIX_BUNDLE_FILE"
- name: Upload Release UWP App-bundle (.msixbundle)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ${{ steps.app_bundle_release.outputs.alxr_msixbundle_path }}
asset_name: ${{ steps.app_bundle_release.outputs.alxr_msixbundle_file }}
asset_content_type: application/zip
upload_uwp_cert:
runs-on: ubuntu-22.04
needs: [build_uwp_app_bundle_debug, build_uwp_app_bundle_release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
repository: "korejan/ALVR"
ref: ${{ needs.build_uwp_app_bundle_release.outputs.release_ref }}
- name: Upload UWP Cert
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build_uwp_app_bundle_release.outputs.upload_url }}
asset_path: ./alvr/openxr-client/alxr-client/uwp/alxr_client_TemporaryKey.pfx
asset_name: alxr_client_TemporaryKey.pfx
asset_content_type: application/octet-stream
publish_release:
runs-on: ubuntu-22.04
needs:
[
prepare_release,
build_windows_server,
#build_linux_server,
build_alxr_linux_portable_release,
build_alxr_linux_portable_debug,
build_alxr_linux_release,
build_alxr_linux_debug,
build_alxr_android_release,
build_alxr_android_debug,
build_alxr_win_x64_release,
build_alxr_win_x64_debug,
build_libalxr_win_x64_release,
upload_uwp_cert
]
steps:
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.prepare_release.outputs.release_id }}