Merge pull request #47 from roteiro-gis/ian/pr3 #33
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: Reference Compat | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: | |
| - "v*" | |
| - "grib-reader-v*" | |
| schedule: | |
| - cron: "17 5 * * 1" | |
| workflow_dispatch: | |
| inputs: | |
| run_benchmarks: | |
| description: Run Criterion comparison benchmarks against ecCodes | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| parity: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.91.0 --profile minimal --component rustfmt,clippy --no-self-update | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run ecCodes parity tests | |
| run: ./scripts/run-reference-parity.sh | |
| benchmarks: | |
| runs-on: ubuntu-24.04 | |
| needs: parity | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_benchmarks }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup toolchain install 1.91.0 --profile minimal --component rustfmt,clippy --no-self-update | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run ecCodes Criterion benchmarks | |
| run: ./scripts/run-reference-benchmarks.sh | |
| - name: Upload Criterion artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: criterion-eccodes-${{ github.sha }} | |
| path: target/criterion | |
| if-no-files-found: warn |