10 runs-on: windows-latest
11 name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
13 CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
15 # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
16 # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
17 # In order to prevent overusing too much of that 60 limit, we throttle the
18 # number of rustfmt jobs that will run concurrently.
25 x86_64-pc-windows-gnu,
26 x86_64-pc-windows-msvc,
28 cfg_release_channel: [nightly, stable]
31 # The Windows runners have autocrlf enabled by default
32 # which causes failures for some of rustfmt's line-ending sensitive tests
33 - name: disable git eol translation
34 run: git config --global core.autocrlf false
36 uses: actions/checkout@v3
39 - name: Install Rustup using win.rustup.rs
41 # Disable the download progress bar which can cause perf issues
42 $ProgressPreference = "SilentlyContinue"
43 Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
44 .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
46 rustup target add ${{ matrix.target }}
49 - name: Add mingw32 to path for i686-gnu
51 echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
52 if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
55 - name: Add mingw64 to path for x86_64-gnu
56 run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
57 if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'