

2 changed files with 119 additions and 0 deletions
@ -0,0 +1,33 @@
|
||||
name: Cross-compile |
||||
on: [push, pull_request] |
||||
|
||||
jobs: |
||||
test: |
||||
name: crosscompile |
||||
runs-on: ubuntu-latest |
||||
|
||||
strategy: |
||||
matrix: |
||||
arch: |
||||
- thumbv6m-none-eabi |
||||
- thumbv7m-none-eabi |
||||
- thumbv7em-none-eabi |
||||
- thumbv7em-none-eabihf |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Install nightly toolchain |
||||
uses: actions-rs/toolchain@v1 |
||||
with: |
||||
toolchain: nightly |
||||
override: true |
||||
|
||||
- name: Install docker and start its service |
||||
run: sudo apt install -y -v docker && sudo systemctl start docker |
||||
|
||||
- name: Install cross |
||||
run: cargo install cross |
||||
|
||||
- name: Crosscompile |
||||
run: cross build --target ${{matrix.arch}} |
@ -0,0 +1,86 @@
|
||||
name: Linters |
||||
|
||||
on: [push, pull_request] |
||||
|
||||
jobs: |
||||
build: |
||||
name: build |
||||
runs-on: ubuntu-latest |
||||
|
||||
strategy: |
||||
matrix: |
||||
toolchain: [stable, beta, nightly] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Install toolchain |
||||
uses: actions-rs/toolchain@v1 |
||||
with: |
||||
toolchain: ${{matrix.toolchain}} |
||||
override: true |
||||
|
||||
- name: Run cargo build |
||||
run: cargo build -v |
||||
|
||||
doc: |
||||
name: doc |
||||
runs-on: ubuntu-latest |
||||
|
||||
strategy: |
||||
matrix: |
||||
toolchain: [stable, beta, nightly] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Install toolchain |
||||
uses: actions-rs/toolchain@v1 |
||||
with: |
||||
toolchain: ${{matrix.toolchain}} |
||||
override: true |
||||
|
||||
- name: Run cargo doc |
||||
run: cargo doc --no-deps |
||||
|
||||
rustfmt: |
||||
name: rustfmt |
||||
runs-on: ubuntu-latest |
||||
|
||||
strategy: |
||||
matrix: |
||||
toolchain: [stable, beta, nightly] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Install toolchain |
||||
uses: actions-rs/toolchain@v1 |
||||
with: |
||||
toolchain: ${{matrix.toolchain}} |
||||
override: true |
||||
components: rustfmt |
||||
|
||||
- name: Run rustfmt |
||||
run: cargo fmt -v -- --check |
||||
|
||||
clippy: |
||||
name: clippy |
||||
runs-on: ubuntu-latest |
||||
|
||||
strategy: |
||||
matrix: |
||||
toolchain: [stable, beta, nightly] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Install toolchain |
||||
uses: actions-rs/toolchain@v1 |
||||
with: |
||||
toolchain: ${{matrix.toolchain}} |
||||
override: true |
||||
components: clippy |
||||
|
||||
- name: Run clippy |
||||
run: cargo clippy -- -D warnings |
Loading…
Reference in new issue