-
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
Showing
4 changed files
with
136 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,68 @@ | ||
on: [push, pull_request] | ||
|
||
name: Build | ||
|
||
env: | ||
RUSTFLAGS: '-D warnings' | ||
|
||
jobs: | ||
ci-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
TARGET: | ||
- x86_64-unknown-linux-gnu | ||
- x86_64-unknown-linux-musl | ||
- arm-unknown-linux-gnueabi # Raspberry Pi 1 | ||
- armv7-unknown-linux-gnueabihf # Raspberry Pi 2, 3, etc | ||
# Bare metal | ||
- thumbv6m-none-eabi | ||
- thumbv7em-none-eabi | ||
- thumbv7em-none-eabihf | ||
- thumbv7m-none-eabi | ||
|
||
include: | ||
# Test MSRV | ||
- rust: 1.31.0 | ||
TARGET: x86_64-unknown-linux-gnu | ||
|
||
- rust: beta | ||
TARGET: x86_64-unknown-linux-gnu | ||
|
||
# Test nightly but don't fail | ||
- rust: nightly | ||
experimental: true | ||
TARGET: x86_64-unknown-linux-gnu | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
target: ${{ matrix.TARGET }} | ||
override: true | ||
|
||
- name: Checkout CI scripts | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'eldruin/rust-driver-ci-scripts' | ||
ref: 'master' | ||
path: 'ci' | ||
|
||
- run: ./ci/patch-no-std.sh | ||
if: ${{ ! contains(matrix.TARGET, 'x86_64') }} | ||
|
||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --target=${{ matrix.TARGET }} | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
if: contains(matrix.TARGET, 'x86_64') | ||
with: | ||
command: test | ||
args: --target=${{ matrix.TARGET }} |
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,21 @@ | ||
on: [push, pull_request] | ||
|
||
name: Clippy check | ||
|
||
env: | ||
RUSTFLAGS: '-D warnings' | ||
|
||
jobs: | ||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
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,28 @@ | ||
on: [push] | ||
|
||
name: Coverage | ||
|
||
jobs: | ||
check: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run cargo-tarpaulin | ||
uses: actions-rs/tarpaulin@v0.1 | ||
with: | ||
args: '--ignore-tests --out Lcov' | ||
|
||
- name: upload to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: './lcov.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,19 @@ | ||
on: [push, pull_request] | ||
|
||
name: Code formatting check | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check |