From faeb85f44c673f80bd30f5cf243529db41d84f2a Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 13 Oct 2021 10:14:34 +0900 Subject: [PATCH] Run MSRV check on Windows CI --- .github/workflows/bors.yml | 26 ++++++++++++++++++++++++++ ci/build.sh | 18 +++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml index 5bbf286c..0b85a7f7 100644 --- a/.github/workflows/bors.yml +++ b/.github/workflows/bors.yml @@ -226,6 +226,30 @@ jobs: - name: Execute build.sh run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh + build_channels_windows: + name: Build Channels Windows + runs-on: windows-2019 + env: + OS: windows + strategy: + fail-fast: true + matrix: + toolchain: [ + 1.19.0, + 1.24.0, + 1.25.0, + 1.30.0, + stable, + ] + steps: + - uses: actions/checkout@v2 + - name: Self-update rustup + run: rustup self update + shell: bash + - name: Execute build.sh + run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} WIN_TARGET=${{ matrix.target }} sh ./ci/build.sh + shell: bash + semver_linux: name: Semver Linux runs-on: ubuntu-20.04 @@ -283,6 +307,7 @@ jobs: docker_switch, build_channels_linux, build_channels_macos, + build_channels_windows, docs, ] @@ -303,6 +328,7 @@ jobs: docker_switch, build_channels_linux, build_channels_macos, + build_channels_windows, docs, ] diff --git a/ci/build.sh b/ci/build.sh index 92103b57..21c08fbe 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -161,6 +161,13 @@ RUST_NIGHTLY_APPLE_TARGETS="\ aarch64-apple-darwin \ " +# Must start with `x86_64-pc-windows-msvc` first. +RUST_NIGHTLY_WINDOWS_TARGETS="\ +x86_64-pc-windows-msvc \ +x86_64-pc-windows-gnu \ +i686-pc-windows-msvc \ +" + # The targets are listed here alphabetically TARGETS="" case "${OS}" in @@ -189,6 +196,10 @@ case "${OS}" in TARGETS="${TARGETS} ${RUST_NIGHTLY_APPLE_TARGETS}" fi + ;; + windows*) + TARGETS=${RUST_NIGHTLY_WINDOWS_TARGETS} + ;; *) ;; @@ -196,7 +207,12 @@ esac for TARGET in $TARGETS; do if echo "$TARGET"|grep -q "$FILTER"; then - test_target build "$TARGET" + if [ "${OS}" = "windows" ]; then + TARGET="$TARGET" sh ./ci/install-rust.sh + test_target build "$TARGET" + else + test_target build "$TARGET" + fi fi done