feat!: make StructArray
generic over child array OffsetElement
and UnionType
#632
This file contains 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: Bench | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
actions: write | |
contents: read | |
jobs: | |
run: | |
name: Bench | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
id: rust-toolchain | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-bench-${{ hashFiles('**/Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-bench- | |
${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}- | |
${{ runner.os }}-cargo- | |
- run: cargo bench --bench narrow --all-features -- --output-format=bencher | tee output.txt | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-results | |
path: output.txt | |
deploy: | |
name: Deploy | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: run | |
environment: | |
name: benchmark-results | |
url: https://mbrobbel.github.io/narrow-benchmark-results/ | |
permissions: | |
deployments: write | |
contents: write | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: benchmark-results | |
- uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: narrow | |
tool: cargo | |
output-file-path: output.txt | |
gh-pages-branch: main | |
gh-repository: github.com/mbrobbel/narrow-benchmark-results | |
benchmark-data-dir-path: . | |
github-token: ${{ secrets.BENCHMARK_RESULTS }} | |
auto-push: true | |
comment-on-alert: true | |
alert-comment-cc-users: "@mbrobbel" |