Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,37 @@ RUN C:/TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \
--channelUri C:/TEMP/VisualStudio.chman \
--installChannelUri C:/TEMP/VisualStudio.chman \
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended \
--installPath C:/BuildTools
--installPath C:/buildtools

ADD https://www.7-zip.org/a/7z${ZIP_VERSION}-x64.exe 7zsetup.exe
#Install 7zip
RUN 7zsetup.exe /S /D=C:/buildtools/7z

SHELL ["C:\\buildtools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

RUN Invoke-WebRequest -UserAgent 'DockerCI' -outfile 7zsetup.exe https://www.7-zip.org/a/7z$env:ZIP_VERSION-x64.exe
RUN Invoke-WebRequest -UserAgent 'DockerCI' github.com/ghaith/llvm-package-windows/releases/download/v$env:LLVM_VER/LLVM-$env:LLVM_VER-win64.7z -outfile C:/TEMP/llvm.7z
RUN Invoke-WebRequest -UserAgent 'DockerCI' https://win.rustup.rs -outfile C:/TEMP/rustup-init.exe
RUN Invoke-WebRequest -UserAgent 'DockerCI' https://github.com/git-for-windows/git/releases/download/v$env:GIT_VERSION.windows.1/PortableGit-$env:GIT_VERSION-64-bit.7z.exe -outfile C:/TEMP/git-install.exe
RUN setx /M PATH "%PATH%;C:\\buildtools\\7z;C:\\buildtools\\llvm\\bin"

#Install 7zip
RUN ./7zsetup /S /D=C:/buildtools/7z
RUN setx /M PATH $($Env:PATH + ';C:/buildtools/7z/')
ADD https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/PortableGit-${GIT_VERSION}-64-bit.7z.exe C:/TEMP/git-install.exe
# Install git to use bash
RUN 7z.exe x C:/TEMP/git-install.exe -ogit

ADD https://github.com/ghaith/llvm-package-windows/releases/download/v${LLVM_VER}/LLVM-${LLVM_VER}-win64.7z C:/TEMP/llvm.7z
# Setup llvm sources
ADD https://github.com/ghaith/llvm-package-windows/releases/download/v$LLVM_VER/LLVM-$LLVM_VER-win64.7z C:/TEMP/llvm.7z


RUN 7z x C:/TEMP/llvm.7z -ollvm

ADD https://win.rustup.rs C:/TEMP/rustup-init.exe
# Install Rust
# RUN scoop install rustup
ADD https://win.rustup.rs C:/TEMP/rustup-init.exe
RUN C:/TEMP/rustup-init.exe --default-toolchain $env:RUST_VER -y
RUN C:/TEMP/rustup-init.exe --default-toolchain %RUST_VER% -y
RUN rustup install stable

RUN rustup component add llvm-tools-preview
RUN cargo install mdbook grcov cargo-nextest

RUN setx /M PATH $($Env:PATH + ';C:/buildtools/llvm/bin')


#RUN cargo install cargo-watch #Activate this for local builds to enable watching
WORKDIR C:/build

SHELL ["C:\\buildtools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

#ENTRYPOINT ["cargo"]
ENTRYPOINT ["C:\\buildtools\\Common7\\Tools\\VsDevCmd.bat", "&&", "C:\\buildtools\\git\\bin\\bash.exe", "-i", "-l"]

Loading