Windows Desktop Client CI (#2)
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:
@@ -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"]
|
||||
Reference in New Issue
Block a user