This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (102 loc) · 4.1 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Compilation and Testing Suite
on:
pull_request:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'README.md'
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
NIGHTLY: nightly
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}
- name: Checkout sources & submodules
uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: recursive
- name: Install Toolchain
run: rustup toolchain add $NIGHTLY
- name: Add WASM Utilities
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
## Build Stage
- name: Building rust-stable
uses: actions-rs/cargo@v1
if: github.ref == 'refs/heads/master'
with:
command: build
toolchain: stable
args: --all --release --verbose
check-test:
name: Check and test
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
NIGHTLY: nightly
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}
- name: Checkout sources & submodules
uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: recursive
- name: Install Toolchain
run: rustup toolchain add $NIGHTLY
- name: Add WASM Utilities
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
## Check Stage
- name: Checking rust-stable
uses: actions-rs/cargo@v1
with:
command: check
toolchain: stable
args: --all --verbose
## Test Stage
- name: Testing rust-stable
uses: actions-rs/cargo@v1
with:
command: test
toolchain: stable
args: --all --verbose
clippy:
name: Clippy
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
NIGHTLY: nightly
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}
- name: Checkout sources & submodules
uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: recursive
- name: Install Toolchain
run: rustup toolchain add $NIGHTLY
- name: Add WASM Utilities
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
## Linting Stage
- name: Add clippy
run: rustup component add clippy --toolchain $NIGHTLY
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
toolchain: nightly
args: --all-targets -- -D warnings