Repository navigation
85 lines (69 loc) · 2.35 KB
/
Copy pathci.yml
File metadata and controls
85 lines (69 loc) · 2.35 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
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 Plugin ships as a dynamic library for each platform, so the tests,
# the structural checks among them, and its release build 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 library Plugin
run: cargo build --locked -p plugin-bashkit --release
# A Host finds the Plugin by this one symbol, and a build without
# the `dll` feature would still write a library, with no export.
- name: The library exports runvil_plugin
if: runner.os == 'Linux'
run: nm -D --defined-only target/release/libplugin_bashkit.so | grep -qw runvil_plugin
# No build or test step may write into the repository; 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
# Almost every item is private, so rustdoc checks their docs only
# with `--document-private-items`.
- name: Docs
run: cargo doc --locked --workspace --no-deps --all-features --document-private-items