Skip to content

Release nightly

Release nightly #1638

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@v4
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@v4
with:
repository: "alvr-org/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
submodules: true
- 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
id: build
env:
RUST_BACKTRACE: 1
run: |
cargo xtask bump --nightly
cargo xtask package-streamer --gpl --ci
$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@v4
with:
repository: "alvr-org/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
submodules: true
- 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 bump --nightly
cargo xtask build-streamer --gpl --ci
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@v4
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
- name: Build and package ALVR
env:
RUST_BACKTRACE: 1
run: |
cargo xtask bump --nightly
cargo xtask package-launcher --ci
- 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@v4
with:
repository: "alvr-org/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build dependencies and package ALVR
env:
RUST_BACKTRACE: 1
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 25088A0359807596
echo "deb http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/pipewire-upstream.list
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 libpipewire-0.3-dev libspa-0.2-dev
cp alvr/xtask/deb/cuda.pc /usr/share/pkgconfig
cargo xtask bump --nightly
cargo xtask package-streamer --gpl --ci
- 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
build_linux_streamer_debug:
runs-on: ubuntu-latest
needs: [prepare_release]
steps:
- uses: actions/checkout@v4
with:
repository: "alvr-org/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build dependencies and package ALVR
env:
RUST_BACKTRACE: 1
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 25088A0359807596
echo "deb http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/pipewire-upstream.list
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 libpipewire-0.3-dev libspa-0.2-dev
cp alvr/xtask/deb/cuda.pc /usr/share/pkgconfig
cargo xtask prepare-deps --platform linux --gpl
cargo xtask bump --nightly
cargo xtask build-streamer --gpl
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@v4
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 and package ALVR
env:
RUST_BACKTRACE: 1
run: |
sudo apt-get update
sudo apt-get install build-essential libgtk-3-dev
cargo xtask bump --nightly
cargo xtask package-launcher --ci
- 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@v4
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@v4
with:
repository: "alvr-org/ALVR"
ref: ${{ needs.prepare_release.outputs.release_ref }}
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-linux-android
override: true
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "17"
- uses: android-actions/setup-android@v3
with:
packages: "platforms;android-32"
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26b
- name: Build and package ALVR
env:
RUST_BACKTRACE: 1
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cargo xtask bump --nightly
cargo xtask package-client --ci
cargo xtask package-client-lib
- name: Sign apk
uses: ilharp/sign-android-release@v1
id: sign_apk
with:
releaseDir: build/alvr_client_android
signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 34.0.0
- 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.signedFile }}
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 }}