Skip to content

Bump version to 2.0.0 #50

Bump version to 2.0.0

Bump version to 2.0.0 #50

Workflow file for this run

name: Rust CI
on:
push:
branches: [ "main", "feature/**" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
# ── Build & Lint ────────────────────────────────────────────────
build-lint:
name: Build & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Cargo/pyproject version sync
run: ./scripts/check_versions.sh
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
rustflags: ""
- name: Build
run: cargo build --verbose
- name: Lint
run: |
cargo fmt -- --check
cargo clippy --all-targets --all-features
# ── Test + Coverage ──────────────────────────────────────────────
test:
name: Test + Coverage
needs: build-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
with:
file: lcov.info
# ── Benchmark: Criterion with baseline comparison ───────────────
benchmark:
name: Benchmark
needs: build-lint
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Run benchmarks
run: cargo bench --bench 'benchmark_*' -- --output-format bencher 2>&1 | tee benchmark-output.txt
env:
CARGO_TERM_COLOR: never
timeout-minutes: 15
- name: Compare benchmarks
uses: benchmark-action/github-action-benchmark@v1
if: github.ref == 'refs/heads/main'
with:
name: difi Benchmarks
tool: cargo
output-file-path: benchmark-output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
summary-always: true
alert-threshold: "200%"
fail-on-alert: false