instant-segment/.github/workflows/rust.yml

64 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2020-05-26 17:59:05 +00:00
name: CI
on:
push:
2020-11-25 21:31:27 +00:00
branches: ['main']
2020-05-26 17:59:05 +00:00
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, beta]
exclude:
- os: macos-latest
rust: beta
- os: windows-latest
rust: beta
runs-on: ${{ matrix.os }}
steps:
2023-10-17 12:48:13 +00:00
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
2020-05-26 17:59:05 +00:00
with:
toolchain: ${{ matrix.rust }}
- run: cargo test -p instant-segment --all-features
2020-05-26 17:59:05 +00:00
2021-08-31 13:09:58 +00:00
test-python:
runs-on: ubuntu-latest
steps:
2023-10-17 12:48:13 +00:00
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build -p instant-segment-py --release
2021-08-31 13:09:58 +00:00
- name: Test Python bindings
run: |
cp target/release/libinstant_segment.so instant-segment-py/test/instant_segment.so
PYTHONPATH=instant-segment-py/test/ python3 -m test
2020-05-26 17:59:05 +00:00
lint:
runs-on: ubuntu-latest
steps:
2023-10-17 12:48:13 +00:00
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
2020-05-26 17:59:05 +00:00
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
2020-05-26 17:59:05 +00:00
2023-10-17 12:49:34 +00:00
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.65.0
- run: cargo c --lib --all-features
2020-05-26 17:59:05 +00:00
audit:
runs-on: ubuntu-latest
steps:
2023-10-17 12:48:13 +00:00
- uses: actions/checkout@v4
2020-11-23 12:24:46 +00:00
- uses: EmbarkStudios/cargo-deny-action@v1