-
-
Notifications
You must be signed in to change notification settings - Fork 18
53 lines (41 loc) · 1.14 KB
/
minsc.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
name: Tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]
jobs:
Test:
runs-on: ubuntu-22.04
env:
CARGO_TERM_COLOR: always
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🗄️ Cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target
- name: 🐛 Check for errors
run: cargo check --all-features
- name: 🧹 Check formatting
run: cargo fmt -- --check
- name: 📎 Check with Clippy
run: cargo clippy --all-targets --all-features
- name: 🔨 Build
run: cargo build --release
- name: 🧪 Run tests
run: MINSC_EXE=target/release/minsc ./tests/test.sh
- name: 📖 Run examples
run: MINSC_EXE=target/release/minsc ./tests/test.sh examples
- name: 📦 Prepare artifacts
run: strip target/release/minsc
- name: 📤️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: minsc
path: target/release/minsc