Fix typo in Maven publish incantation #2751
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: Rust benchmark | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
benchmark: | |
name: Run Rust benchmark example | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run benchmark | |
env: | |
POLAR_IGNORE_NO_ALLOW_WARNING: 1 | |
run: cargo bench -q -- --output-format bencher | tee output.txt | |
- name: Upload benchmark result artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bench_result | |
path: output.txt | |
# Split the benchmark testing step into a separate | |
# step that runs against the existing code on the | |
# _target_ branch (typically `main`) | |
bench-check: | |
name: Check benchmark result | |
runs-on: ubuntu-latest | |
needs: benchmark | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: bench_result | |
- name: Get HEAD commit message | |
id: head_commit | |
run: echo "::set-output name=message::$(git log -1 --format=%B | tr -d '\n')" | |
- name: Store benchmark result | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
name: Rust Benchmark | |
tool: "cargo" | |
output-file-path: output.txt | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-on-alert: true | |
alert-comment-cc-users: "@osohq/eng" | |
alert-threshold: "150%" | |
# Only push and save on pushes to main. | |
auto-push: ${{ github.event_name == 'push' && github.repository == 'osohq/oso' && github.ref == 'refs/heads/main' }} | |
# Comment on pushes to main AND on any commit that includes `[bench]` | |
# in the message. | |
comment-always: ${{ (github.event_name == 'push' && github.repository == 'osohq/oso' && github.ref == 'refs/heads/main') || contains(steps.head_commit.outputs.message, '[bench]') }} | |
save-data-file: ${{ github.event_name == 'push' && github.repository == 'osohq/oso' && github.ref == 'refs/heads/main' }} |