Skip to content

Split benchmarks into 2 - default behaviour and string parameters. #1070

Split benchmarks into 2 - default behaviour and string parameters.

Split benchmarks into 2 - default behaviour and string parameters. #1070

Workflow file for this run

name: ci
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: read
id-token: write
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: "1"
jobs:
checks:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#ci --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: ci
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Run checks
run: |
set -eufo pipefail
cargo fmt --all --check
cargo clippy --workspace
cargo check --workspace
cargo build --workspace
cargo test --workspace
cargo test --workspace --doc
benchmarks:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#ci --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: ci
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build benchmarks
run: cargo codspeed build --workspace
- name: Upload benchmark results to CodSpeed
uses: CathalMullan/action@main
with:
shell: nix develop .#ci --command bash {0}
run: cargo codspeed run
token: "${{ secrets.CODSPEED_TOKEN }}"
coverage:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#nightly --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: nightly
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Generate coverage
run: cargo llvm-cov --workspace --doctests --codecov --output-path codecov.json
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v4
with:
files: codecov.json
fail_ci_if_error: true
token: "${{ secrets.CODECOV_TOKEN }}"
msrv:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#msrv --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: msrv
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build wayfind
run: cargo build --package wayfind
wasm:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#msrv --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: msrv
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build wayfind
run: cargo build --package wayfind --target wasm32-unknown-unknown
oci:
runs-on: ubuntu-24.04
defaults:
run:
shell: nix develop .#ci --command bash {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup
with:
shell: ci
cachix-auth-token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Run OCI tests
run: |
set -eufo pipefail
cd examples/oci
cargo build
cargo run &
PID="${!}"
sleep 3
oci-conformance
kill "${PID}"
- name: Upload test results to Codecov
if: always() && !cancelled()
uses: codecov/test-results-action@v1
with:
files: examples/oci/junit.xml
fail_ci_if_error: true
token: "${{ secrets.CODECOV_TOKEN }}"
- name: Upload test report to GitHub
if: always() && !cancelled()
uses: actions/upload-artifact@v4
with:
name: report
path: examples/oci/report.html