feat(feff10): add parity coverage and SFCONV support #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| core: | |
| name: Core (${{ matrix.toolchain }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: [stable, beta] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: Build core crate | |
| run: cargo build -p xraytsubaki --verbose | |
| - name: Run core crate tests | |
| run: cargo test -p xraytsubaki --verbose | |
| strict-gates: | |
| name: Strict Gates (stable) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: clippy, rustfmt | |
| - name: Run strict clippy | |
| run: cargo clippy -p xraytsubaki --all-targets -- -D warnings | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Check Python bindings crate | |
| run: cargo check --manifest-path py-xraytsubaki/Cargo.toml --verbose | |
| benchmark: | |
| name: Benchmark Regression | |
| runs-on: ubuntu-latest | |
| needs: [core, strict-gates] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Run single benchmark | |
| run: cargo bench -p xraytsubaki --bench xas_group_benchmark_single -- --noplot | |
| - name: Run parallel benchmark | |
| run: cargo bench -p xraytsubaki --bench xas_group_benchmark_parallel -- --noplot | |
| - name: Evaluate benchmark regression (informational on PR, blocking on push) | |
| run: | | |
| MODE="informational" | |
| if [ "${{ github.event_name }}" = "push" ]; then | |
| MODE="blocking" | |
| fi | |
| ./crates/xraytsubaki/scripts/bench_regression_gate.sh "$MODE" | |
| - name: Upload benchmark artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-artifacts | |
| path: | | |
| target/criterion | |
| target/bench-regression-summary.md |