diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/build-release.yaml similarity index 96% rename from .gitea/workflows/test.yaml rename to .gitea/workflows/build-release.yaml index ed13449..e763868 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/build-release.yaml @@ -1,5 +1,5 @@ name: Build Mumble Web 2 -on: [workflow_dispatch] +on: [push] jobs: linux_build: @@ -44,6 +44,8 @@ jobs: windows_build: runs-on: windows + container: + image: git.ohea.xyz/mumble/mumbl-web2/windows-release-builder:latest steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.gitea/workflows/windows-container-build.yaml b/.gitea/workflows/windows-container-build.yaml index 505c409..db756ea 100644 --- a/.gitea/workflows/windows-container-build.yaml +++ b/.gitea/workflows/windows-container-build.yaml @@ -1,5 +1,5 @@ name: Build Mumble Web 2 release builder containers -on: [push] +on: [workflow_dispatch] jobs: windows-release-builder-container-build: diff --git a/docker/windows-release-builder.Dockerfile b/docker/windows-release-builder.Dockerfile index c52cebf..e391c3f 100644 --- a/docker/windows-release-builder.Dockerfile +++ b/docker/windows-release-builder.Dockerfile @@ -39,6 +39,33 @@ RUN powershell -Command ` .\rustup-init.exe -y --default-toolchain stable; ` Remove-Item .\rustup-init.exe +# Install Chocolatey +RUN ["powershell.exe", "-NoLogo", "-NoProfile", "-Command", ` + "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'))" ` + ] + +# Install Git and Rustup via Chocolatey +RUN ["powershell.exe", "-NoLogo", "-NoProfile", "-Command", ` + "choco install git -y --no-progress; ` + choco install rustup.install -y --no-progress" ` + ] + +# Install stable Rust toolchain +RUN ["powershell.exe", "-NoLogo", "-NoProfile", "-Command", ` + "$env:Path += ';C:\\Users\\ContainerAdministrator\\.cargo\\bin'; ` + rustup toolchain install stable-x86_64-pc-windows-msvc; ` + rustup default stable-x86_64-pc-windows-msvc" ` + ] + +# Install dioxus-cli from git HEAD with cargo +RUN ["powershell.exe", "-NoLogo", "-NoProfile", "-Command", ` + "$env:Path += ';C:\\Users\\ContainerAdministrator\\.cargo\\bin'; ` + cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli" ` + ] + # Define the entry point for the docker container. # This entry point starts the developer command prompt and launches the PowerShell shell. ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]