diff --git a/.circleci/config.yml b/.circleci/config.yml index 90e14a2a5..e3b69fb2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,7 +99,7 @@ executors: machine: image: 'windows-server-2019-vs2019:stable' resource_class: windows.xlarge - shell: bash + shell: powershell.exe -ExecutionPolicy Bypass environment: XTASK_TARGET: "x86_64-pc-windows-msvc" @@ -130,43 +130,39 @@ commands: platform: type: executor steps: - - rust/install: - version: << parameters.rust_channel >> - - # - unless: - # condition: - # equal: [ *windows_executor, << parameters.platform >> ] - # steps: - # - rust/install: - # version: << parameters.rust_channel >> - # - when: - # condition: - # equal: [ *windows_executor, << parameters.platform >> ] - # steps: - # - run: - # name: Install rustup - # environment: - # # Override auto-detection of RAM for rustc install. - # # https://github.com/rust-lang/rustup/issues/2229#issuecomment-585855925 - # RUSTUP_UNPACK_RAM: "21474836480" - # command: | - # $installer_dir = "$Env:TEMP" - # echo "Downloading rustup" - # (New-Object System.Net.WebClient).DownloadFile("https://win.rustup.rs/x86_64", "$installer_dir\rustup-init.exe") - # echo "Installing rustup" - # & $installer_dir\rustup-init.exe --profile minimal -y - # exit $LASTEXITCODE - # - run: - # name: Special case for Windows because of ssh-agent - # command: | - # Add-Content -path "${Env:USERPROFILE}\.cargo\config.toml" @" - # [net] - # git-fetch-with-cli = true - # "@ - - - run: - name: Install specific rust toolchain - command: rustup target add $XTASK_TARGET + - unless: + condition: + equal: [ *windows_executor, << parameters.platform >> ] + steps: + - rust/install: + version: << parameters.rust_channel >> + - run: + name: Install specific rust toolchain + command: rustup target add $XTASK_TARGET + - when: + condition: + equal: [ *windows_executor, << parameters.platform >> ] + steps: + - run: + name: Install rustup + environment: + # Override auto-detection of RAM for rustc install. + # https://github.com/rust-lang/rustup/issues/2229#issuecomment-585855925 + RUSTUP_UNPACK_RAM: "21474836480" + command: | + $installer_dir = "$Env:TEMP" + echo "Downloading rustup" + (New-Object System.Net.WebClient).DownloadFile("https://win.rustup.rs/x86_64", "$installer_dir\rustup-init.exe") + echo "Installing rustup" + & $installer_dir\rustup-init.exe --profile minimal -y + exit $LASTEXITCODE + - run: + name: Special case for Windows because of ssh-agent + command: | + Add-Content -path "${Env:USERPROFILE}\.cargo\config.toml" @" + [net] + git-fetch-with-cli = true + "@ install_system_deps: parameters: