fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.1 KiB62 linesraw
1name: windows
2on:
3  push:
4    branches:
5      - master
6  pull_request:
7
8jobs:
9  test:
10    runs-on: windows-latest
11    name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
12    env:
13      CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
14    strategy:
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.
19      max-parallel: 2
20      fail-fast: false
21      matrix:
22        target: [
23          i686-pc-windows-gnu,
24          i686-pc-windows-msvc,
25          x86_64-pc-windows-gnu,
26          x86_64-pc-windows-msvc,
27        ]
28        cfg_release_channel: [nightly, stable]
29
30    steps:
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
35    - name: checkout
36      uses: actions/checkout@v3
37
38      # Run build
39    - name: Install Rustup using win.rustup.rs
40      run: |
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
45        del rustup-init.exe
46        rustup target add ${{ matrix.target }}
47      shell: powershell
48
49    - name: Add mingw32 to path for i686-gnu
50      run: |
51        echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
52      if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
53      shell: bash
54
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'
58      shell: bash
59
60    - name: Build and Test
61      shell: cmd
62      run: ci\build_and_test.bat