-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (89 loc) · 2.24 KB
/
rust.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Rust
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
changes:
runs-on: ubuntu-latest
outputs:
trigger: ${{ steps.changes.outputs.triggers }}
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
lfs: false
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
triggers:
- 'libs/**'
- '.github/workflows/rust.yml'
lint:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.trigger == 'true'
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Clippy
working-directory: .
run: cargo make clippy
doctest:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.trigger == 'true'
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Doctest
working-directory: .
run: cargo make test-doc
test:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.trigger == 'true'
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Test
working-directory: .
run: cargo make test
docs:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.trigger == 'true'
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
- uses: davidB/rust-cargo-make@v1
- name: Run makers docs
run: cargo make docs
- name: Check that crates.js is surely copied
run: test -e target/doc/crates.js
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/doc