-
Notifications
You must be signed in to change notification settings - Fork 41
51 lines (47 loc) · 1.17 KB
/
check_and_build.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
name: Check and Build code on all major operating systems
on:
push:
branches:
- master
paths:
- '**.rs'
- 'Cargo.*'
pull_request:
branches:
- master
paths:
- '**.rs'
- 'Cargo.*'
schedule:
- cron: "0 2 * * 0-6"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Check and Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- nightly
os:
- ubuntu-latest
- windows-latest
- macOS-latest
steps:
- uses: actions/checkout@v2
- name: Install minimal ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
default: true
- name: Install clippy
run: rustup component add clippy
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Check workspace each feature
run: cargo hack clippy --workspace --each-feature -- -D warnings
- name: Build workspace each feature
run: cargo hack build --workspace --each-feature