-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add matrix CI using Github Actions #353
Changes from 15 commits
4e494ea
5475b97
f2f3535
1ccc560
cfe326a
b5777c1
09a6cb6
6c0eca1
4042fc0
e5819f7
d22be74
e8901df
d8bb36a
df5f6a8
b21bfa1
32b7e34
8b087fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
rust: [stable, nightly] | ||
|
||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly simplifies the install of the rustc version & components with with:
rust-version: stable
components: clippy |
||
with: | ||
rust-version: ${{ matrix.rust }} | ||
components: rustfmt, clippy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove the components here and move clippy to a separate job as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep. Wondering if a separate check task is necessary as clippy does run check (https://stackoverflow.com/questions/57449356/is-cargo-clippy-a-superset-of-cargo-check) |
||
- uses: actions/checkout@master | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
check: | ||
name: check (ubuntu-latest, stable) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: stable | ||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
- name: Cargo Check | ||
run: cargo check | ||
|
||
clippy: | ||
name: clippy (ubuntu-latest, stable) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: stable | ||
components: clippy | ||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
- name: Cargo Clippy | ||
run: cargo clippy -- -D warnings -A deprecated | ||
|
||
fmt: | ||
name: fmt (ubuntu-latest, stable) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: stable | ||
components: rustfmt | ||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
- name: Check Formatting | ||
run: cargo fmt --all -- --check |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
status = [ | ||
"build (ubuntu-latest, stable)", | ||
"build (ubuntu-latest, nightly)", | ||
"build (windows-latest, stable)", | ||
"build (windows-latest, nightly)", | ||
"build (macOS-latest, stable)", | ||
"build (macOS-latest, nightly)", | ||
"continuous-integration/travis-ci/push", | ||
"continuous-integration/appveyor/branch", | ||
] | ||
use_squash_merge = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about running nightly on all platforms, ubuntu should be enough, also we should allow it to fail