Release nightly #1205
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: Release nightly | |
env: | |
CARGO_TERM_COLOR: always | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 22 * * *" | |
jobs: | |
prepare_release: | |
runs-on: windows-2019 | |
outputs: | |
release_ref: ${{ steps.gen_tag.outputs.release_ref }} | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
release_id: ${{ steps.create_release.outputs.id }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Generate tag, set release ref | |
id: gen_tag | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
$out = cargo xtask bump --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 Release | |
id: create_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.gen_tag.outputs.version_tag }} | |
release_name: ALVR ${{ steps.gen_tag.outputs.version_tag }} | |
# TODO: gather commit messages to post here in the body | |
body: | | |
Nightly release of ALVR: ${{ steps.gen_tag.outputs.version_tag }} | |
Generated from commit: alvr-org/ALVR@${{ steps.gen_tag.outputs.release_ref }} | |
draft: true | |
prerelease: false | |
build_windows_streamer: | |
# Windows latest has Rust, Android NDK and LLVM already installed. | |
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md | |
runs-on: windows-2019 | |
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 (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: install zip unzip pkgconfiglite wixtoolset | |
- name: Build and package ALVR | |
id: build | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask prepare-deps --platform windows --gpl --ci | |
cargo xtask bump --nightly | |
cargo xtask package-streamer --gpl | |
$file = Get-ChildItem -Name .\build\*.exe | Select-Object -f 1 | |
echo "::set-output name=exe_filename::$file" | |
# Upload artifacts | |
- name: Upload installer (exe) | |
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 installer (msi) | |
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_streamer_windows.msi | |
asset_name: alvr_streamer_windows.msi | |
asset_content_type: application/octet-stream | |
- name: Upload portable streamer (zip) | |
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_streamer_windows.zip | |
asset_name: alvr_streamer_windows.zip | |
asset_content_type: application/zip | |
build_windows_streamer_debug: | |
runs-on: windows-2019 | |
needs: [prepare_release] | |
env: | |
LIBCLANG_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: install zip unzip pkgconfiglite | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask prepare-deps --platform windows --gpl --ci | |
cargo xtask bump --nightly | |
cargo xtask build-streamer --gpl | |
cd build | |
zip -r9X alvr_streamer_windows . | |
- name: Upload portable streamer (zip) | |
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_streamer_windows.zip | |
asset_name: alvr_streamer_windows_debug.zip | |
asset_content_type: application/zip | |
build_windows_launcher: | |
runs-on: windows-2019 | |
needs: [prepare_release] | |
env: | |
LIBCLANG_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: install zip wixtoolset | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask bump --nightly | |
cargo xtask package-launcher | |
- name: Upload portable launcher (zip) | |
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_launcher_windows.zip | |
asset_name: alvr_launcher_windows.zip | |
asset_content_type: application/zip | |
build_linux_streamer: | |
runs-on: ubuntu-latest | |
needs: [prepare_release] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/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 add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install libfuse2 build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libxrandr-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit libgtk-3-dev | |
git clone https://github.com/FFmpeg/nv-codec-headers.git | |
cd nv-codec-headers/ | |
sudo make install | |
cd .. | |
cp alvr/xtask/deb/cuda.pc /usr/share/pkgconfig | |
cargo xtask prepare-deps --platform linux | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask bump --nightly | |
cargo xtask package-streamer | |
- name: Upload linux streamer | |
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_streamer_linux.tar.gz | |
asset_name: alvr_streamer_linux.tar.gz | |
asset_content_type: application/gzip | |
- name: Build and package ALVR (AppImage) | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask package-streamer --appimage --zsync | |
- name: Upload linux streamer (AppImage) | |
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-x86_64.AppImage | |
asset_name: ALVR-x86_64.AppImage | |
asset_content_type: application/x-executable | |
- name: Upload linux streamer (AppImage.zsync) | |
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-x86_64.AppImage.zsync | |
asset_name: ALVR-x86_64.AppImage.zsync | |
asset_content_type: application/octet-stream | |
build_linux_streamer_debug: | |
runs-on: ubuntu-latest | |
needs: [prepare_release] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/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 add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install libfuse2 build-essential pkg-config nasm libva-dev libdrm-dev libvulkan-dev libx264-dev libx265-dev cmake libasound2-dev libjack-jackd2-dev libxrandr-dev libunwind-dev libffmpeg-nvenc-dev nvidia-cuda-toolkit libgtk-3-dev | |
git clone https://github.com/FFmpeg/nv-codec-headers.git | |
cd nv-codec-headers/ | |
sudo make install | |
cd .. | |
cp alvr/xtask/deb/cuda.pc /usr/share/pkgconfig | |
cargo xtask prepare-deps --platform linux | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask bump --nightly | |
cargo xtask build-streamer | |
tar -czvf ./build/alvr_streamer_linux.tar.gz -C ./build alvr_streamer_linux | |
- name: Upload linux streamer | |
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_streamer_linux.tar.gz | |
asset_name: alvr_streamer_linux_debug.tar.gz | |
asset_content_type: application/gzip | |
build_linux_launcher: | |
runs-on: ubuntu-latest | |
needs: [prepare_release] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install dependencies | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential libgtk-3-dev | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
cargo xtask bump --nightly | |
cargo xtask package-launcher | |
- name: Upload linux launcher | |
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_launcher_linux.tar.gz | |
asset_name: alvr_launcher_linux.tar.gz | |
asset_content_type: application/gzip | |
build_flatpak_bundle: | |
runs-on: ubuntu-latest | |
needs: [prepare_release] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- name: Build and install dependencies | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install flatpak flatpak-builder | |
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
- name: Build and package ALVR flatpak (.flatpak) | |
id: build_flatpak | |
run: | | |
sudo flatpak-builder --repo=.flatpak-repo --install-deps-from=flathub --force-clean --default-branch=stable --arch=x86_64 .flatpak-build-dir alvr/xtask/flatpak/com.valvesoftware.Steam.Utility.alvr.json | |
flatpak build-bundle .flatpak-repo com.valvesoftware.Steam.Utility.alvr.flatpak com.valvesoftware.Steam.Utility.alvr stable --runtime | |
- name: Upload flatpak streamer 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: com.valvesoftware.Steam.Utility.alvr.flatpak | |
asset_name: com.valvesoftware.Steam.Utility.alvr.flatpak | |
asset_content_type: application/octet-stream | |
build_android_client: | |
runs-on: ubuntu-latest | |
needs: [prepare_release] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: "alvr-org/ALVR" | |
ref: ${{ needs.prepare_release.outputs.release_ref }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-linux-android | |
override: true | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r25c | |
- name: Build and package ALVR | |
env: | |
RUST_BACKTRACE: 1 | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
run: | | |
cargo xtask prepare-deps --platform android --ci | |
cargo xtask bump --nightly | |
cargo xtask package-client | |
cargo xtask package-client-lib | |
- name: Sign apk | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_apk | |
with: | |
releaseDirectory: build/alvr_client_android | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload apk | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.prepare_release.outputs.upload_url }} | |
asset_path: ${{ steps.sign_apk.outputs.signedReleaseFile }} | |
asset_name: alvr_client_android.apk | |
asset_content_type: application/vnd.android.package-archive | |
- name: Upload client library | |
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_client_core.zip | |
asset_name: alvr_client_core.zip | |
asset_content_type: application/zip | |
publish_release: | |
runs-on: ubuntu-latest | |
needs: | |
[ | |
prepare_release, | |
build_windows_streamer, | |
build_windows_streamer_debug, | |
build_windows_launcher, | |
build_linux_streamer, | |
build_linux_streamer_debug, | |
build_linux_launcher, | |
build_flatpak_bundle, | |
build_android_client, | |
] | |
steps: | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.prepare_release.outputs.release_id }} |