generated from PoCInnovation/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
4389ca0
commit 46f0966
Showing
2 changed files
with
105 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "cargo-common", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(warning|warn|error)(\\[(\\S*)\\])?: (.*)$", | ||
"severity": 1, | ||
"message": 4, | ||
"code": 3 | ||
}, | ||
{ | ||
"regexp": "^\\s+-->\\s(\\S+):(\\d+):(\\d+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "compiler-panic", | ||
"pattern": [ | ||
{ | ||
"regexp": "error: internal compiler error: (.*):(\\d+):(\\d+): (.*)$", | ||
"message": 4, | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-fmt", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(Diff in (\\S+)) at line (\\d+):", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,61 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
run: | | ||
set -euo pipefail | ||
rustup default beta | ||
rustup component add rustfmt | ||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/problem_matchers.json" | ||
- name: Check Rust formatting | ||
run: cargo fmt --check | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
run: | | ||
set -euo pipefail | ||
rustup default beta | ||
rustup component add clippy | ||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/problem_matchers.json" | ||
- name: Run Clippy | ||
run: cargo clippy -- -Dwarnings | ||
checks: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
rust-version: [ "stable", "beta", "nightly" ] | ||
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
run: | | ||
set -euo pipefail | ||
rustup default ${{ matrix.rust-version }} | ||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/problem_matchers.json" | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|