-
Notifications
You must be signed in to change notification settings - Fork 311
90 lines (69 loc) · 1.87 KB
/
cbindgen.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
name: cbindgen
on:
push:
branches:
- master
pull_request:
branches:
- master
merge_group:
types:
- checks_requested
jobs:
rustfmt-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: "clippy, rustfmt"
- name: Run rustfmt
run: |
cargo +stable fmt --check
- name: Run clippy
run: |
cargo +stable clippy --workspace -- -D warnings
- name: Install minimum supported Rust version
id: msrv
uses: dtolnay/rust-toolchain@1.70
- name: Build with minimum supported Rust version
run: |
cargo +${{steps.msrv.outputs.name}} test nonexistent-test --verbose
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Cython
run: |
python -m pip install --upgrade pip wheel
pip install Cython==3.0.2
- name: Build
run: |
cargo +stable build --verbose
- name: Build no-default-features
run: |
cargo +stable build --verbose --no-default-features
- name: Test package
env:
CBINDGEN_TEST_VERIFY: 1
run: |
cargo +stable package --verbose
(cd target/package/cbindgen-$(cargo +stable run -- --version | cut -d ' ' -f 2) && cargo +stable test --verbose)
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly
- name: Test
env:
CBINDGEN_TEST_VERIFY: 1
run: |
cargo +nightly test --verbose
- name: Test minimal-versions
run: |
cargo +nightly update -Zminimal-versions
cargo +nightly test