-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
342634d
commit 1a214be
Showing
24 changed files
with
275 additions
and
109 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Linux CI Rust | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: read | ||
checks: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install system dependencies | ||
run: | | ||
tools/install-sys-dependencies-linux | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
rust | ||
- name: Install Rust dependencies | ||
run: | | ||
tools/install-rust-dependencies dev | ||
- name: Check code formatting | ||
run: | | ||
cargo fmt --check | ||
working-directory: rust | ||
|
||
- name: Check Clippy warnings | ||
run: | | ||
cargo clippy -- -D warnings | ||
working-directory: rust | ||
|
||
- name: Run tests | ||
run: | | ||
cargo llvm-cov nextest --profile ci --no-fail-fast --lcov --output-path coverage.info | ||
working-directory: rust | ||
|
||
- name: Rust Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
continue-on-error: true | ||
with: | ||
name: Rust Tests | ||
path: | | ||
rust/target/nextest/ci/junit.xml | ||
reporter: java-junit | ||
|
||
- name: Gather and check Rust code coverage | ||
run: | | ||
tools/check-coverage rust/coverage.stats rust/coverage.info |
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,2 @@ | ||
[profile.ci.junit] | ||
path = "junit.xml" |
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 @@ | ||
83.9 |
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,7 @@ | ||
# Put a trailing comma after a block based match arm (non-block arms are not affected) | ||
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#match_block_trailing_comma | ||
match_block_trailing_comma = true | ||
|
||
# Use field initialize shorthand if possible. | ||
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#use_field_init_shorthand | ||
use_field_init_shorthand = 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
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
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
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
Oops, something went wrong.