Skip to content

Commit bbf142c

Browse files
committed
nightly-5.8: add windows docker containers
This adds a docker container configuration to get a nightly 5.8 toolchain configured. The use of this will enable better testing on other projects (e.g. swift-driver, swift-package-manager, sourcekit-lsp).
1 parent eb58ac0 commit bbf142c

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

Diff for: nightly-5.8/windows/10.0.20348.1487/Dockerfile

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# escape=`
2+
3+
FROM mcr.microsoft.com/windows/servercore:10.0.20348.1487 AS windows
4+
5+
LABEL maintainer="Swift Infrastructure <[email protected]>"
6+
LABEL description="Docker Container for the Swift programming language"
7+
8+
ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.36.0.windows.1/Git-2.36.0-64-bit.exe
9+
ARG PYTHON=https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe
10+
ARG SWIFT_SNAPSHOT=https://download.swift.org/swift-5.8-branch/windows10/swift-5.8-DEVELOPMENT-SNAPSHOT-2023-01-09-a/swift-5.8-DEVELOPMENT-SNAPSHOT-2023-01-09-a-windows10.exe
11+
12+
# restore the default Windows shell for correct batch processing
13+
SHELL ["cmd", "/S", "/C"]
14+
15+
# Enable Developer Mode.
16+
RUN reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
17+
18+
# Enable Long Paths
19+
RUN reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /t REG_DWORD /f /v "LongPathsEnabled" /d "1"
20+
21+
# Install Git.
22+
# See: git-[version]-[bit].exe /SAVEINF=git.inf and /?
23+
COPY git.inf .
24+
RUN `
25+
curl -SLo git.exe %GIT% `
26+
&& (start /w git.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /NORESTART /CLOSEAPPLICATIONS /FORCECLOSEAPPLICATIONS /LOADINF=git.inf ) `
27+
&& del /q git.exe git.inf
28+
29+
# Install Python.
30+
# See: https://docs.python.org/3.10/using/windows.html
31+
# FIXME: it appears that `PYTHONHOME` and `PYTHONPATH` are unset
32+
COPY unattend.xml .
33+
RUN `
34+
curl -SLo python.exe %PYTHON% `
35+
&& (start /w python.exe /quiet ) `
36+
&& del /q python.exe unattend.xml
37+
38+
# Install Visual Studio Build Tools
39+
RUN `
40+
curl -SLo vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
41+
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
42+
--add Microsoft.VisualStudio.Component.Windows11SDK.22000 `
43+
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
44+
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
45+
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 `
46+
--add Microsoft.VisualStudio.Component.VC.Tools.ARM `
47+
|| IF "%EXITCODE%"=="3010" EXIT 0) `
48+
&& del /q vs_buildtools.exe
49+
50+
# Install Swift
51+
RUN `
52+
curl -SLo installer.exe %SWIFT_SNAPSHOT% `
53+
&& (start /w installer.exe /q) `
54+
&& del /q installer.exe
55+
56+
# FIXME: we should use a non-Administrator user
57+
# USER ContainerUser
58+
59+
ENV PYTHONUTF8=1
60+
# Default to powershell
61+
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "-arch=amd64", "-host_arch=amd64", "&&", "cmd", "-nologo"]

Diff for: nightly-5.8/windows/10.0.20348.1487/git.inf

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Setup]
2+
NoIcons=1
3+
Components=gitlfs
4+
EditorOption=VIM
5+
PathOption=Cmd
6+
SSHOption=OpenSSH
7+
TurtoiseOption=false
8+
CURLOption=WinSSL
9+
BashTerminalOption=ConHost
10+
PerformanceTweaksFSCache=Enabled
11+
EnableSymlinks=Enabled
12+
EnablePseudoConsoltSupport=Disabled
13+
EnableFSMonitor=Enabled

Diff for: nightly-5.8/windows/10.0.20348.1487/unattend.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Options>
3+
<Option Name="InstallAllUsers" Value="1" />
4+
<Option Name="AssociateFiles" Value="0" />
5+
<Option Name="PrependPath" Value="1" />
6+
<Option Name="Shortcuts" Value="0" />
7+
<Option Name="Include_doc" Value="0" />
8+
<Option Name="Include_debug" Value="0" />
9+
<Option Name="Include_dev" Value="1" />
10+
<Option Name="Include_exe" Value="1" />
11+
<Option Name="Include_launcher" Value="0" />
12+
<Option Name="InstallLauncherAllUsers" Value="0" />
13+
<Option Name="Include_lib" Value="1" />
14+
<Option Name="Include_symbols" Value="0" />
15+
<Option Name="Include_tcltk" Value="0" />
16+
<Option Name="Include_test" Value="0" />
17+
<Option Name="Include_tools" Value="0" />
18+
</Options>

0 commit comments

Comments
 (0)