136 lines
4.2 KiB
YAML
136 lines
4.2 KiB
YAML
name: Build Mumble Web 2
|
|
on: [push]
|
|
|
|
jobs:
|
|
linux_build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
targets: wasm32-unknown-unknown
|
|
|
|
- name: Install cargo binstall
|
|
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
- name: Install dioxus-cli
|
|
run: cargo binstall dioxus-cli --version 0.7.3
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Build dioxus project
|
|
run: dx build --platform web --release -p mumble-web2-gui
|
|
|
|
- name: Upload mumble-web2-gui Artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
|
with:
|
|
name: mumble-web2-gui
|
|
path: target/dx/mumble-web2-gui/release/web/public
|
|
retention-days: 5
|
|
|
|
- name: Build proxy
|
|
run: cargo build --release -p mumble-web2-proxy
|
|
|
|
- name: Upload mumble-web2-proxy Artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
|
with:
|
|
name: mumble-web2-proxy
|
|
path: target/release/mumble-web2-proxy
|
|
retention-days: 5
|
|
|
|
macos_build:
|
|
runs-on: macos
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install cargo binstall
|
|
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
- name: Install dioxus-cli
|
|
run: cargo binstall dioxus-cli --version 0.7.3 --no-confirm
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Print env
|
|
run: env
|
|
|
|
- name: Build dioxus project
|
|
run: dx build --platform macos --release -p mumble-web2-gui
|
|
|
|
- name: Upload mumble-web2-gui Artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
|
with:
|
|
name: mumble-web2-gui-macos-arm64
|
|
path: gui/dist
|
|
retention-days: 5
|
|
|
|
windows_build:
|
|
runs-on: windows
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Restore Rust cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.cargo
|
|
./target
|
|
key: rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
rust-${{ runner.os }}-
|
|
|
|
- name: Pull builder container
|
|
run: docker pull git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest
|
|
|
|
- name: Bundle dioxus project
|
|
run: docker run `
|
|
--mount "type=bind,source=${PWD},target=C:\app" `
|
|
--workdir "C:\app\gui" `
|
|
git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest `
|
|
C:\Users\ContainerAdministrator\.cargo\bin\dx.exe bundle --verbose --trace -p mumble-web2-gui --release --windows
|
|
|
|
- name: Save Rust cache
|
|
if: always()
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.cargo
|
|
./target
|
|
key: rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Upload mumble-web2-gui Windows Artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
|
with:
|
|
name: mumble-web2-gui-windows
|
|
path: gui/dist
|
|
retention-days: 5
|
|
|
|
android_build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: git.ohea.xyz/mumble/mumble-web2/android-release-builder:latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Build dioxus project (x86_64-linux-android)
|
|
run: dx build --platform android --target x86_64-linux-android --release -p mumble-web2-gui
|
|
|
|
- name: Build dioxus project (aarch64-linux-android)
|
|
run: dx build --platform android --target aarch64-linux-android --release -p mumble-web2-gui
|
|
|
|
- name: Upload mumble-web2-gui Android Artifact
|
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
|
with:
|
|
name: mumble-web2-android
|
|
path: target/dx/mumble-web2-gui/release/android/app/app/build/outputs/apk/debug/app-debug.apk
|
|
retention-days: 5
|