-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.55 KB
/
ci.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on: [push, pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
MACOSX_DEPLOYMENT_TARGET: 10.13
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-10.14]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
id: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Linux-specific dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libz-dev libgtk-3-dev
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: |
r1/${{ github.workflow }}/${{ runner.os }}/rust/${{ steps.install_rust.outputs.rustc_hash }}/${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
r1/${{ github.workflow }}/${{ runner.os }}/rust/${{ steps.install_rust.outputs.rustc_hash }}/
- name: cargo check
run: cargo check --verbose --workspace --all-targets
- name: cargo build
run: cargo build --verbose
- name: cargo test
run: cargo test --verbose --workspace
- name: cargo fmt
run: cargo fmt --verbose --all -- --check
- name: cargo clippy
run: cargo clippy --verbose --workspace