Repository navigation
89 lines (71 loc) · 2.28 KB
/
Copy pathci.yml
File metadata and controls
89 lines (71 loc) · 2.28 KB
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
name: CI
on:
push:
branches: [master, main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Format
run: cargo fmt --all --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- name: Clippy
env:
CARGO_BUILD_WARNINGS: deny
run: cargo clippy --locked --workspace --all-targets --all-features
# The layout check compiles the header with each platform's own C and C++
# compilers, so the tests run on all three.
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache cargo
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- name: Test
run: cargo test --locked --workspace --all-features
- name: Build the example library Plugin
run: cargo build --locked -p hello-plugin --release
# No build or test step may write into the repository, the header
# included; catch a regression here rather than in a diff.
- name: Clean tree
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "the build dirtied the repository:"
git status --porcelain
exit 1
fi
docs:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Cache cargo
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- name: Docs
run: cargo doc --locked --workspace --no-deps --all-features
# The oldest toolchain a Plugin author may build the two published crates
# with, their `rust-version`.
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install 1.85
run: rustup toolchain install 1.85 --profile minimal
- name: Check
run: cargo +1.85 check --locked -p runvil-plugin-sys -p runvil-plugin-sdk --all-features