-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
64 additions
and
45 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,45 @@ | ||
name: Benchmark | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
Benchmark: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Checkout base | ||
uses: actions/checkout@v2 | ||
- name: Update rust | ||
run: rustup toolchain update stable | ||
- name: Run benchmarks | ||
run: cargo bench -- -R bencher | tee output.txt | ||
- name: Download base benchmark | ||
with: | ||
ref: master | ||
- name: Cache cargo | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark-${{ github.ref }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-benchmark-${{ github.ref }}-${{ github.sha }} | ||
${{ runner.os }}-benchmark-${{ github.ref }} | ||
${{ runner.os }}-benchmark | ||
- name: Compare benchmarks for Pull Requests | ||
uses: rhysd/github-action-benchmark@v1 | ||
if: github.event_name == 'pull_request' | ||
path: ~/.cargo | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Bench base | ||
run: cargo bench -- -R bencher | tee output.txt | ||
- name: Save base benchmark | ||
uses: pksunkara/github-action-benchmark@v1 | ||
with: | ||
tool: cargo | ||
output-file-path: output.txt | ||
external-data-json-path: ./cache/benchmark-data.json | ||
github-token: ${{ github.token }} | ||
comment-always: true | ||
save-data-file: false | ||
- name: Compare benchmarks for master branch | ||
uses: rhysd/github-action-benchmark@v1 | ||
if: github.event_name == 'push' | ||
external-data-json-path: ./benchmark-data.json | ||
read-commit-id: true | ||
- name: Checkout pull request | ||
uses: actions/checkout@v2 | ||
with: | ||
clean: false | ||
- name: Bench pull request | ||
run: cargo bench -- -R bencher | tee output.txt | ||
- name: Compare benchmarks | ||
uses: pksunkara/github-action-benchmark@v1 | ||
with: | ||
tool: cargo | ||
output-file-path: output.txt | ||
external-data-json-path: ./cache/benchmark-data.json | ||
external-data-json-path: ./benchmark-data.json | ||
github-token: ${{ github.token }} | ||
alert-threshold: 125% | ||
comment-on-alert: true | ||
comment-always: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Linux | ||
on: | ||
push: | ||
branches: [master, staging, trying] | ||
pull_request: | ||
branches: [master, staging, trying] | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
test-release: | ||
name: Release Profile Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Cache cargo | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release --features "yaml unstable" | ||
- name: Cleanup cache | ||
run: rm -rf ~/.cargo/registry/src |
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
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