Build:
  1. 2
  2. 1
  3. 0
2024-10-02 17:42.39: New job: Build using windows-1809-x86_64 in
                                [https://github.com/ocaml-opam/opam-repository-mingw#sunset (69dbd0eda2e75b7085cff45755111c73a7a42d1a)]
2024-10-02 17:42.39: Will push staging image to ocurrent/opam-staging:windows-msvc-ltsc2019-opam-amd64

Dockerfile:

# escape=`

# Autogenerated by OCaml-Dockerfile scripts
FROM mcr.microsoft.com/windows:10.0.17763.6293 as winget-builder
USER ContainerAdministrator
ADD [ "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle", "C:\\TEMP\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.zip" ]
RUN powershell -Command "Expand-Archive -LiteralPath C:\TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.zip -DestinationPath C:\TEMP\winget-cli -Force"
RUN ren C:\TEMP\winget-cli\AppInstaller_x64.msix AppInstaller_x64.zip
RUN powershell -Command "Expand-Archive -LiteralPath C:\TEMP\winget-cli\AppInstaller_x64.zip -DestinationPath C:\TEMP\winget-cli\ -Force"
RUN mkdir "C:\Program Files\winget-cli" && `
  move "C:\TEMP\winget-cli\\winget.exe" "C:\Program Files\winget-cli\" && `
  move "C:\TEMP\winget-cli\\WindowsPackageManager.dll" "C:\Program Files\winget-cli\" && `
  move "C:\TEMP\winget-cli\\resources.pri" "C:\Program Files\winget-cli\"

FROM mcr.microsoft.com/windows:10.0.17763.6293 as cygwin-msvc
USER ContainerAdministrator
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "\\$"') do `
          for /f "delims=" %l in ('cmd /v:on /c "set v=%c&& echo !v:~0,-1!"') do `
            reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "%l"
ADD [ "https://raw.githubusercontent.com/ocurrent/ocaml-dockerfile/master/src-opam/Install.cmd", "C:\\TEMP\\" ]
ADD [ "https://aka.ms/vscollect.exe", "C:\\TEMP\\collect.exe" ]
ADD [ "https://aka.ms/vs/17/release/channel", "C:\\TEMP\\VisualStudio.chman" ]
RUN curl -SL --output C:\TEMP\vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
    && (call C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache install `
        --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
        --channelUri C:\TEMP\VisualStudio.chman `
        --installChannelUri C:\TEMP\VisualStudio.chman `
        --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
        --add Microsoft.VisualStudio.Component.Windows10SDK.18362 `
        --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
        --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
        --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
        --remove Microsoft.VisualStudio.Component.Windows81SDK) `
    && del /q C:\TEMP\vs_buildtools.exe
ENV CYGWIN="nodosfilewarning winsymlinks:native"
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "^[^H]"') do `
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "C:\cygwin64\bin;%c"
ADD [ "https://www.cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe" ]
RUN mkdir C:\cygwin64\lib\cygsympathy && mkdir C:\cygwin64\etc\postinstall
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.cmd", "C:\\cygwin64\\lib\\cygsympathy\\" ]
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.sh", "C:\\cygwin64\\lib\\cygsympathy\\cygsympathy" ]
RUN mklink C:\cygwin64\etc\postinstall\zp_zcygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy
RUN C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --local-package-dir C:\TEMP\cache --root C:\cygwin64 --site https://mirrors.kernel.org/sourceware/cygwin/ --symlink-type=native --packages diffutils,git,make,patch && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
RUN C:\cygwin64\bin\peflags -d0 C:\cygwin64\bin\cygwin1.dll
ADD [ "https://github.com/metastack/msvs-tools/archive/refs/heads/master.tar.gz", "C:\\TEMP\\msvs-tools.tar.gz" ]
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp && tar -xf /cygdrive/c/TEMP/msvs-tools.tar.gz && cp msvs-tools-master/msvs-detect msvs-tools-master/msvs-promote-path /bin && rm -rf /cygdrive/c/TEMP/msvs-tools/*"
RUN awk -i inplace "/(^#)|(^$)/{print;next}{$4=""noacl,""$4; print}" C:\cygwin64\etc\fstab

FROM cygwin-msvc as opam-builder
ENV HOME="C:\cygwin64\home\opam"
RUN C:\cygwin64\bin\bash.exe --login -c "git config --global user.email 'docker@example.com' && git config --global user.name 'Docker' && git config --system core.longpaths true && git config --global --add safe.directory /tmp/opam-sources"
RUN C:\cygwin64\bin\bash.exe --login -c "git clone https://github.com/ocaml/opam /tmp/opam && cd /tmp/opam && git checkout 7130814860b355c87e6d5480f4dc876d8f7aca9a && make compiler OCAML_PORT=msvc64"
RUN C:\cygwin64\bin\bash.exe --login -c "git clone /tmp/opam /tmp/opam-build-2.2 && cd /tmp/opam-build-2.2 && git config --global --add safe.directory /tmp/opam-build-2.2 && git checkout 01e9a24a61e23e42d513b4b775d8c30c807439b2"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp/opam-build-2.2 && env PATH="/tmp/opam/bootstrap/ocaml/bin:$PATH" ./configure --enable-cold-check  --with-vendored-deps --with-0install-solver && env PATH="/tmp/opam/bootstrap/ocaml/bin:$PATH" make && make install && mv /usr/local/bin/opam.exe /usr/local/bin/opam-2.2.exe"
RUN C:\cygwin64\bin\bash.exe --login -c "git clone /tmp/opam /tmp/opam-build-master && cd /tmp/opam-build-master && git config --global --add safe.directory /tmp/opam-build-master && git checkout 7130814860b355c87e6d5480f4dc876d8f7aca9a"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp/opam-build-master && env PATH="/tmp/opam/bootstrap/ocaml/bin:$PATH" ./configure --enable-cold-check  --with-vendored-deps --with-0install-solver && env PATH="/tmp/opam/bootstrap/ocaml/bin:$PATH" make && make install && mv /usr/local/bin/opam.exe /usr/local/bin/opam-master.exe"

FROM cygwin-msvc
LABEL distro_style="windows"
USER ContainerAdministrator
RUN C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --local-package-dir C:\TEMP\cache --root C:\cygwin64 --site https://mirrors.kernel.org/sourceware/cygwin/ --symlink-type=native --packages curl,diffutils,git,m4,make,patch,perl,rsync,unzip && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
ADD [ "https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz", "C:\\TEMP\\" ]
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp && tar -xf /cygdrive/c/TEMP/opam64.tar.xz && ./opam64/install.sh --prefix=/usr && rm -rf opam64 opam64.tar.xz"
ADD [ "https://aka.ms/vs/17/release/vc_redist.x64.exe", "C:\\TEMP\\" ]
RUN C:\TEMP\vc_redist.x64.exe /install /passive /norestart /log C:\TEMP\vc_redist.log && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
COPY --from=winget-builder [ "C:\\Program Files\\winget-cli", "C:\\Program Files\\winget-cli" ]
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "^[^H]"') do `
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "C:\Program Files\winget-cli;%c"
RUN powershell -Command "$path=(Join-Path $env:LOCALAPPDATA 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState'); New-Item $path -ItemType Directory -Force; '{ """"$schema"""": """"https://aka.ms/winget-settings.schema.json"""", """"telemetry"""": { """"disable"""": """"true"""" } }' | Out-File -encoding ASCII (Join-Path $path 'settings.json')"
COPY --from=opam-builder [ "C:\\cygwin64\\usr\\local\\bin\\opam-2.2.exe", "C:\\opam-2.2.exe" ]
RUN move C:\opam-2.2.exe C:\cygwin64\usr\local\bin
COPY --from=opam-builder [ "C:\\cygwin64\\usr\\local\\bin\\opam-master.exe", "C:\\opam-dev.exe" ]
RUN move C:\opam-dev.exe C:\cygwin64\usr\local\bin
WORKDIR C:\cygwin64\home\opam
ENV HOME="C:\cygwin64\home\opam"
RUN C:\cygwin64\bin\bash.exe --login -c "git config --global user.email 'docker@example.com' && git config --global user.name 'Docker' && git config --system core.longpaths true && git config --global --add safe.directory /home/opam/opam-repository"
COPY [ ".", "C:\\cygwin64\\home\\opam\\opam-repository" ]
ENV OPAMROOT="C:\opam\.opam"
RUN opam init -k local -a "C:\cygwin64\home\opam\opam-repository" --bare --disable-sandboxing
RUN opam repo add ocurrent-overlay git+https://github.com/ocurrent/opam-repository-mingw#514541c9957ded860594146061738a060d3138e9 --set-default
RUN C:\cygwin64\bin\bash.exe --login -c "rm -rf /cygdrive/c/opam/.opam/repo/default/.git"
COPY [ "Dockerfile", "/Dockerfile.opam" ]


2024-10-02 17:42.39: Using cache hint "opam-windows-msvc-ltsc2019"
2024-10-02 17:42.39: Waiting for resource in pool OCluster
2024-10-02 17:42.40: Waiting for worker…
2024-10-02 17:42.40: Got resource from pool OCluster
Building on ltsc2019-2
All commits already cached
HEAD is now at 69dbd0eda Merge pull request #21 from dra27/changes-b530f3bbd2
2024-10-03 01:30.30: Job failed: Disconnected: Switch turned off