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
|
2023-10-17 12:45:48 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@master
|
2020-05-26 17:59:05 +00:00
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust }}
|
2023-10-17 12:47:10 +00:00
|
|
|
- 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
|
2023-10-17 12:45:48 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-10-17 12:47:10 +00:00
|
|
|
- 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
|
2023-10-17 12:45:48 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2020-05-26 17:59:05 +00:00
|
|
|
with:
|
|
|
|
components: rustfmt, clippy
|
2023-10-17 12:47:10 +00:00
|
|
|
- run: cargo fmt --all -- --check
|
|
|
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
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
|