-
Notifications
You must be signed in to change notification settings - Fork 73
42 lines (39 loc) · 1.23 KB
/
build.yaml
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
on: [push, pull_request]
name: continuous_builds
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
features:
- default
steps:
- name: checkout
uses: actions/checkout@v2
- name: Generate cache key
run: echo "${{ matrix.rust }} ${{ matrix.features }}" | tee .cache_key
- name: cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Set default toolchain
run: rustup default ${{ matrix.rust }}
- name: Set profile
run: rustup set profile minimal
- name: Add clippy
run: rustup component add clippy
- name: Update toolchain
run: rustup update
- name: Build
run: cargo build --features ${{ matrix.features }} --no-default-features
# Uncomment clippy check after failures are removed
# - name: Clippy
# run: cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings