-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (58 loc) · 1.98 KB
/
rustsat.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
name: RustSAT
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
name: Build and test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build-test"
- name: Cargo build
run: cargo build -p rustsat --verbose --features=all
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
- name: Cargo test
run: cargo test -p rustsat --verbose --features=all
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
pystubs:
name: Test python stubs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install maturin from PyPI
uses: install-pinned/maturin@dfebcaa782a69944b584ec164e97fbbd09885352
- name: Install mypy from PyPI
uses: install-pinned/mypy@c2223951641cbb406fa8526d08f0690899f130e4
- name: Install python project
run: maturin build -m rustsat/Cargo.toml && pip install --no-index --find-links target/wheels/ rustsat
- name: Test stubs
run: stubtest --mypy-config-file rustsat/pyproject.toml --allowlist rustsat/stubtest-allowlist.txt rustsat
cbindgen:
name: Test generated C header
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Check C header
run: |
cargo install cbindgen
cbindgen -c rustsat/cbindgen.toml --crate rustsat -o rustsat/rustsat.h --verify