-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.42 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Rust
on:
pull_request:
push:
branches:
- master
jobs:
rust:
name: Rust
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
env:
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
CARGO_INCREMENTAL: 0
RUSTUP_MAX_RETRIES: 10
CARGO_NET_RETRY: 10
steps:
- name: Checkout repository
uses: actions/checkout@v2
# We need to disable the existing toolchain to avoid updating rust-docs
# which takes a long time. The fastest way to do this is to rename the
# existing folder, as deleting it takes about as much time as not doing
# anything and just updating rust-docs.
- name: Rename existing rust toolchain (Windows)
if: matrix.os == 'windows-latest'
run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy
- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Check
shell: bash
run: cargo check --manifest-path rust/Cargo.toml
# run: cargo build --manifest-path rust/Cargo.toml