Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 73 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,97 @@
name: CI
name: CI/CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --verbose

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install maturin
- name: Run tests
run: cargo test --verbose

- name: Run property tests
run: cargo test --features="proptest" --verbose

- name: Run benchmarks
run: cargo bench --verbose
run: cargo test --all-features
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run fmt
run: cargo fmt --all -- --check

docs:
name: Build and Deploy Docs
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build docs
run: |
cargo doc --no-deps --all-features
mdbook build book
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc

wasm:
name: Build WASM
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Build WASM
run: wasm-pack build --target web

clippy:
name: Clippy
python:
name: Build Python Bindings
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions-rs/toolchain@v1
with:
components: clippy
- uses: Swatinem/rust-cache@v2

- name: Clippy check
run: cargo clippy -- -D warnings
toolchain: stable
override: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install maturin
- name: Build Python package
run: maturin build --release

format:
name: Format
publish:
name: Publish to crates.io
needs: [test, docs, wasm, python]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions-rs/toolchain@v1
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2

- name: Check formatting
run: cargo fmt --all -- --check
toolchain: stable
override: true
- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
57 changes: 0 additions & 57 deletions .history/.github/workflows/ci_20250115160132.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .history/.github/workflows/ci_20250115160153.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .history/Cargo_20250115154735.toml

This file was deleted.

30 changes: 0 additions & 30 deletions .history/Cargo_20250115155440.toml

This file was deleted.

30 changes: 0 additions & 30 deletions .history/Cargo_20250115155951.toml

This file was deleted.

30 changes: 0 additions & 30 deletions .history/Cargo_20250115160026.toml

This file was deleted.

Loading
Loading