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:
|
2020-11-23 12:24:46 +00:00
|
|
|
- uses: actions/checkout@v2
|
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 }}
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
2021-03-24 10:50:29 +00:00
|
|
|
args: -p instant-segment --all-features --all-targets
|
2020-05-26 17:59:05 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2021-03-24 10:50:29 +00:00
|
|
|
args: -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:
|
|
|
|
- uses: actions/checkout@v2
|
2023-10-17 12:45:48 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2021-08-31 13:09:58 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: -p instant-segment-py --release
|
|
|
|
- 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:
|
2020-11-23 12:24:46 +00:00
|
|
|
- uses: actions/checkout@v2
|
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
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
command: clippy
|
2020-11-25 21:24:08 +00:00
|
|
|
args: --workspace --all-targets --all-features -- -D warnings
|
2020-05-26 17:59:05 +00:00
|
|
|
|
|
|
|
audit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-23 12:24:46 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|