summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/.github/workflows/windows.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/rustfmt/.github/workflows/windows.yml
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/rustfmt/.github/workflows/windows.yml')
-rw-r--r--src/tools/rustfmt/.github/workflows/windows.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/tools/rustfmt/.github/workflows/windows.yml b/src/tools/rustfmt/.github/workflows/windows.yml
new file mode 100644
index 000000000..ec37c714b
--- /dev/null
+++ b/src/tools/rustfmt/.github/workflows/windows.yml
@@ -0,0 +1,62 @@
+name: windows
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ test:
+ runs-on: windows-latest
+ name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
+ env:
+ CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
+ strategy:
+ # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
+ # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
+ # In order to prevent overusing too much of that 60 limit, we throttle the
+ # number of rustfmt jobs that will run concurrently.
+ max-parallel: 2
+ fail-fast: false
+ matrix:
+ target: [
+ i686-pc-windows-gnu,
+ i686-pc-windows-msvc,
+ x86_64-pc-windows-gnu,
+ x86_64-pc-windows-msvc,
+ ]
+ cfg_release_channel: [nightly, stable]
+
+ steps:
+ # The Windows runners have autocrlf enabled by default
+ # which causes failures for some of rustfmt's line-ending sensitive tests
+ - name: disable git eol translation
+ run: git config --global core.autocrlf false
+ - name: checkout
+ uses: actions/checkout@v3
+
+ # Run build
+ - name: Install Rustup using win.rustup.rs
+ run: |
+ # Disable the download progress bar which can cause perf issues
+ $ProgressPreference = "SilentlyContinue"
+ Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
+ .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
+ del rustup-init.exe
+ rustup target add ${{ matrix.target }}
+ shell: powershell
+
+ - name: Add mingw32 to path for i686-gnu
+ run: |
+ echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
+ if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
+ shell: bash
+
+ - name: Add mingw64 to path for x86_64-gnu
+ run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
+ if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
+ shell: bash
+
+ - name: Build and Test
+ shell: cmd
+ run: ci\build_and_test.bat