2020-09-23 22:22:37 -05:00
|
|
|
name: windows
|
2020-11-13 22:17:07 -06:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
2020-09-23 22:22:37 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: windows-latest
|
2021-11-24 02:35:01 -06:00
|
|
|
name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
|
|
|
|
env:
|
|
|
|
CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
|
2020-09-23 22:22:37 -05:00
|
|
|
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.
|
2021-01-01 10:46:20 -06:00
|
|
|
max-parallel: 2
|
2020-09-23 22:22:37 -05:00
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
target: [
|
|
|
|
i686-pc-windows-gnu,
|
|
|
|
i686-pc-windows-msvc,
|
|
|
|
x86_64-pc-windows-gnu,
|
|
|
|
x86_64-pc-windows-msvc,
|
|
|
|
]
|
2021-11-24 02:35:01 -06:00
|
|
|
cfg_release_channel: [nightly, stable]
|
2020-09-23 22:22:37 -05:00
|
|
|
|
|
|
|
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
|
2022-04-30 16:07:43 -05:00
|
|
|
uses: actions/checkout@v3
|
2020-09-23 22:22:37 -05:00
|
|
|
|
|
|
|
# Run build
|
2021-02-17 12:29:00 -06:00
|
|
|
- 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
|
2020-09-23 22:22:37 -05:00
|
|
|
|
2021-01-01 10:46:20 -06:00
|
|
|
- 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
|
|
|
|
|
2022-06-21 10:23:13 -05:00
|
|
|
- name: Build and Test
|
2020-09-23 22:22:37 -05:00
|
|
|
shell: cmd
|
2022-06-21 10:23:13 -05:00
|
|
|
run: ci\build_and_test.bat
|