-
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·49 lines (49 loc) · 1.39 KB
/
test-core.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
name: Test Core
on:
push:
# FIXME(qix-): DRY this up when\b\bif actions/runner#1182 is ever fixed.
paths:
- '.github/workflows/test-core.yml'
- 'minimap-core/**'
- '.rustfmt.toml'
- 'Cargo.toml'
- 'Cargo.lock'
pull_request:
paths:
- '.github/workflows/test-core.yml'
- 'minimap-core/**'
- '.rustfmt.toml'
- 'Cargo.toml'
- 'Cargo.lock'
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-x86_64-unknown-linux-gnu
components: rustfmt, clippy, llvm-tools-preview
default: true
- name: Cache build artifacts
uses: swatinem/rust-cache@v2
with:
key: minimap-core-target
- name: Lint
run: cargo fmt --all --check
- name: Build <D>
run: cargo build --profile=dev -p minimap-core
- name: Build <R>
run: cargo build --profile=release -p minimap-core
- name: Clippy <D>
run: cargo clippy -p minimap-core --tests -- -D clippy::all
- name: Clippy <R>
run: cargo clippy -p minimap-core --tests --release -- -D clippy::all
- name: Test
run: cargo test -p minimap-core
- name: Doc
run: cargo doc -p minimap-core