-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
f5e0b6a
commit 2fa32e6
Showing
5 changed files
with
171 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ master, develop ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable,beta,nightly,1.31.0] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-features | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release --all-features | ||
bench: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: actions-rs/install@v0.1 | ||
with: | ||
crate: cargo-criterion | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: criterion | ||
args: --all-features | ||
|
||
coverage: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- uses: actions-rs/grcov@v0.1 | ||
id: coverage | ||
with: | ||
config: grcov.yml | ||
|
||
- uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{ steps.coverage.outputs.report }} | ||
flag-name: run-${{ matrix.os }} | ||
parallel: true | ||
- uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ steps.coverage.outputs.report }} | ||
flags: run-${{ matrix.os }} | ||
verbose: true | ||
|
||
finish: | ||
needs: coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: 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,35 @@ | ||
name: Rust Linting | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/*.rs' | ||
- '**/Cargo.toml' | ||
branches-ignore: | ||
- dependabot/* | ||
pull_request: | ||
branches: [ master, develop ] | ||
jobs: | ||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: rustup component add clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
- uses: actions-rs/cargo@v1 | ||
if: github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' | ||
with: | ||
command: clippy | ||
args: all-targets -- -D warnings | ||
formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check |
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,20 @@ | ||
|
||
name: Cargo Audit Scanning | ||
on: | ||
push: | ||
paths: | ||
- "**/Cargo.toml" | ||
- "**/Cargo.lock" | ||
schedule: | ||
- cron: "0 14 * * *" # 14:00 UTC | ||
jobs: | ||
cargo-audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/audit-check@v1 | ||
# Don't run on dependabot PRs or forks | ||
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653 | ||
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,6 @@ | ||
branch: true | ||
ignore-not-existing: true | ||
llvm: true | ||
filter: covered | ||
output-type: lcov | ||
output-path: ./target/lcov.info |