Windows Desktop Client CI (#2)
Build Mumble Web 2 / linux_build (push) Successful in 1m43s
Build Mumble Web 2 / windows_build (push) Successful in 2m38s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 11s

Adds a windows container build and a windows client build.
Outstanding issues:
- I'm not sure if `workflow_dispatch` works. Based on [this PR](https://github.com/go-gitea/gitea/pull/28163) it seems like it should, but I don't see a button. It might only work after merging into the default branch.
- The windows build container is building dioxus from git HEAD because there is an unreleased bugfix we are depending on. We should revert this to a versioned release (maybe using `binstall`) once they cut 0.7.2

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2025-12-05 03:58:11 +00:00
parent 40bb8e18ef
commit a11fb4f10e
17 changed files with 180 additions and 124 deletions
+85
View File
@@ -0,0 +1,85 @@
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.1
- 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
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
-43
View File
@@ -1,43 +0,0 @@
name: Build dioxus container
on: [push]
jobs:
BuildContainer:
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.1
- 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
@@ -0,0 +1,27 @@
name: Build Mumble Web 2 release builder containers
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
jobs:
windows-release-builder-container-build:
runs-on: windows
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to container registry
uses: docker/login-action@v3
with:
registry: git.ohea.xyz
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Build Windows image
shell: bash
run: |
docker pull "$(grep -m1 '^FROM' Dockerfile | awk '{print $2}')"
docker build -t git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest -f ./docker/windows-release-builder.Dockerfile .
docker push git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest
+3 -4
View File
@@ -2,13 +2,12 @@
## Running Desktop
1. `cargo install dioxus-cli --version 0.6.3`
1. `cargo install dioxus-cli --version 0.7.1`
2. `dx run -p mumble-web2-gui --platform desktop --release`
## Running Web (development)
1. `cargo install dioxus-cli --version 0.6.3`
1. `cargo install dioxus-cli --version 0.7.1`
3. `dx serve -p mumble-web2-gui --platform web`
2. `cd docker && docker compose up`
4. connect to `https://localhost:64444`
@@ -16,7 +15,7 @@
## Running Web (with `proxy` only)
1. `cargo install dioxus-cli --version 0.6.3`
1. `cargo install dioxus-cli --version 0.7.1`
2. `dx build -p mumble-web2-gui --platform web --release`
3. `cp config.toml.example config.toml`
4. `cargo run -p mumble-web2-proxy` in the background
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
set -e
# Install the Dioxus CLI
#cargo install dioxus-cli --version 0.7.1
# Build the Dioxus web app (assumes workspace subproject at ./gui)
cd gui
dx build --platform web --release
cd ..
# Build the backend (proxy package)
#cargo build --release -p proxy
#
## Prepare artifact directories
#mkdir -p artifacts
#
## Copy Dioxus webroot (usually at gui/dist)
#cp -r gui/dist artifacts/webroot
#
## Copy backend binary (proxy)
## Finds the built binary under target/release/
#PROXY_PATH=$(cargo metadata --format-version=1 --no-deps |
# jq -r '.packages[] | select(.name=="proxy") | .targets[] | select(.kind[] == "bin") | .name')
#cp "target/release/$PROXY_PATH" "artifacts/proxy"
#
#echo "Artifacts have been prepared at ./artifacts"
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
set -e
mkdir -p ./cargo-tmp
mkdir -p ./docker-target
rm -rf ./docker-tmp
mkdir ./docker-tmp
rsync -av --exclude-from=.gitignore --exclude .git/ --exclude docker-tmp/ --exclude cargo-tmp/ --exclude docker-target/ ./ ./docker-tmp/
docker build -f ./docker/release-builder.Dockerfile -t mumbleweb2-builder:latest .
docker run -it --rm \
-v "$(pwd)/docker-tmp":/work \
-v "$(pwd)/docker-target":/work/target \
-v "$(pwd)/cargo-tmp/registry":/usr/local/cargo/registry \
-v "$(pwd)/cargo-tmp/git":/usr/local/cargo/git \
-w /work \
mumbleweb2-builder:latest /bin/bash ./bin/build-release.sh
-22
View File
@@ -1,22 +0,0 @@
FROM rust:1-bookworm AS base
# Install cargo-binstall for faster CLI installation
#RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN apt-get update && apt-get install -y screen
# Install dioxus-cli version 0.6.3 specifically
RUN cargo install dioxus-cli --version 0.6.3
# Set working directory
WORKDIR /app
# Add wasm32 target for web development
RUN rustup target add wasm32-unknown-unknown
# Set environment variables
ENV PATH="/root/.cargo/bin:$PATH"
# Default command (can be overridden in docker-compose)
CMD ["dx", "--help"]
-2
View File
@@ -48,8 +48,6 @@ services:
ports:
- "64738:64738/tcp"
- "64738:64738/udp"
environment:
- MUMBLE_CONFIG_WELCOMETEXT=Welcome to the Mumble server
network_mode: host
#volumes:
# caddy_data:
-6
View File
@@ -1,6 +0,0 @@
#FROM rust:latest
FROM rust:1.90.0-trixie
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall dioxus-cli --version 0.6.3
+53
View File
@@ -0,0 +1,53 @@
# escape=`
# Use a Windows Server Core 2025 image that matches our build host.
# If the version doesn't match the build host we cannot run
# this container. I'm not sure with what specificity it has to
# match, so let's pin this and then upgrade it as we upgrade
# the host.
FROM mcr.microsoft.com/windows/servercore:10.0.26100.7171
ENV CMAKE_VERSION=3.31.10
ENV CMAKE_ARCH=windows-x86_64
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
&& ( start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Workload.NativeDesktop `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0 )
SHELL ["powershell", "-NoLogo", "-ExecutionPolicy", "Bypass", "-Command"]
RUN $ErrorActionPreference = 'Stop'; `
$url = \"https://github.com/Kitware/CMake/releases/download/v$env:CMAKE_VERSION/cmake-$env:CMAKE_VERSION-$env:CMAKE_ARCH.zip\"; `
$out = 'C:\\cmake.zip'; `
(New-Object System.Net.WebClient).DownloadFile($url, $out); `
Expand-Archive -Path $out -DestinationPath 'C:\\'; `
Remove-Item $out; `
$cmakeDir = \"C:\\cmake-$env:CMAKE_VERSION-$env:CMAKE_ARCH\\bin\"; `
[Environment]::SetEnvironmentVariable('PATH', $cmakeDir + ';' + $env:PATH, 'Machine')
# Install Chocolatey
RUN Set-ExecutionPolicy Bypass -Scope Process; `
[System.Net.ServicePointManager]::SecurityProtocol = `
[System.Net.SecurityProtocolType]::Tls12; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
RUN choco install git -y --no-progress
RUN choco install rustup.install -y --no-progress
RUN rustup toolchain install stable-x86_64-pc-windows-msvc
RUN rustup default stable-x86_64-pc-windows-msvc
SHELL ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
# Install dioxus-cli from git HEAD with cargo
# This is to work around a bug in the windows builder upstream.
# Dioxus has released 0.7.2, but it seems to be broken for now.
RUN cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
+11
View File
@@ -31,3 +31,14 @@ script = []
style = []
# Javascript code file
script = []
[bundle]
identifier = "xyz.ohea.mumble-web-2"
publisher = "OheaCorp"
icon = [
"icons/32x32.png",
"icons/256x256.png",
"assets/favicon.ico",
"icons/icon.icns",
"icons/icon.ico",
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB