Skip to content

Commit

Permalink
Improvements to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Apr 10, 2020
1 parent 79ff2b4 commit 1a2f4c3
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 36 deletions.
10 changes: 5 additions & 5 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ stages:
rust: 1.40.0
strategy:
matrix:
Windows 32-bit (MSVC):
MSVC 32-bit:
image: vs2017-win2016
target: i686-pc-windows-msvc
Windows 64-bit (MSVC):
MSVC 64-bit:
image: vs2017-win2016
target: x86_64-pc-windows-msvc
Windows 32-bit (MinGW):
MinGW 32-bit:
image: vs2017-win2016
target: i686-pc-windows-gnu
Windows 64-bit (MinGW):
MinGW 64-bit:
image: vs2017-win2016
target: x86_64-pc-windows-gnu
pool:
Expand Down Expand Up @@ -58,7 +58,7 @@ stages:
RUST_BACKTRACE: full
- script: |
rmdir /Q /S C:\Rust\.cargo\registry\src
rmdir /Q /S target\.rustc_info.json
del target\.rustc_info.json
rmdir /Q /S target\debug\examples
rmdir /Q /S target\debug\incremental
rmdir /Q /S target\tests\target\debug\incremental
Expand Down
49 changes: 21 additions & 28 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
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
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'
ref: master
- 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
- 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
30 changes: 30 additions & 0 deletions .github/workflows/linux.yml
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: Checkout
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Cache cargo
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --features "yaml unstable"
- name: Cleanup cache
run: rm -rf ~/.cargo/registry/src
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
- rust: beta
- rust: nightly
cache: false
- name: Release profile tests
script:
- cargo test -v --release --features yaml unstable
- name: Linting (fmt + clippy)
before_script:
- rustup component add clippy
Expand Down
2 changes: 2 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
status = [
"continuous-integration/travis-ci/push",
"clap-rs.clap",
"Release Profile Tests",
]
pr_status = [
"continuous-integration/travis-ci/pr",
"clap-rs.clap",
"Release Profile Tests",
]
timeout_sec = 7200
prerun_timeout_sec = 7200
Expand Down

0 comments on commit 1a2f4c3

Please sign in to comment.