Skip to content

Update rust version in CI #27

Update rust version in CI

Update rust version in CI #27

Workflow file for this run

# This file is based on https://github.com/rust-lang/rustfmt/blob/master/.github/workflows/windows.yml
# rustfmt is licensed in MIT Copyright (c) 2016-2021 The Rust Project Developers https://github.com/rust-lang/rustfmt/blob/master/LICENSE-MIT
name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
env:
CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
strategy:
fail-fast: false
matrix:
target: [
i686-pc-windows-msvc,
x86_64-pc-windows-msvc,
i686-pc-windows-gnu,
x86_64-pc-windows-gnu,
]
cfg_release_channel: [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
- name: Cache cargo registry
uses: actions/cache@v2
continue-on-error: true
with:
path: |
~/.cargo/registry
~/.cargo/git
key: rust-${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-build
restore-keys: |
rust-${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-
rust-${{ runner.os }}-cargo-${{ matrix.target }}-
rust-${{ runner.os }}-cargo-
# 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
# Nightly config has been removed
- name: build
run: |
rustc -Vv
cargo -V
cargo build
shell: cmd
- name: test
run: |
cargo test
shell: cmd
- name: Package
run: |
cargo package --verbose
shell: cmd