Skip to content

Commit

Permalink
CI updates
Browse files Browse the repository at this point in the history
Make embedded its own check, rather than part of the OS-level checking.
Also remove nightly, as we already know it works on stable.
  • Loading branch information
jhpratt committed Apr 18, 2020
1 parent 27df92b commit 070943f
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [1.34.0, 1.36.0, stable, nightly]
rust: [1.34.0, 1.36.0, stable]
os: [ubuntu-latest, windows-latest, macOS-latest]
target: [thumbv7em-none-eabihf]

steps:
- name: Checkout sources
Expand All @@ -29,23 +28,22 @@ jobs:
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true

# ensure `#![no_std]` support on embedded target
# ensure `#![no_std]` support
- name: Run `cargo check --no-default-features`
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --target ${{ matrix.target }}
args: --no-default-features
if: matrix.rust != '1.34.0' # alloc is unstable in 1.34

# `#![no_std]` with serde, rand on embedded target
# `#![no_std]` with serde, rand
- name: Run `cargo check --no-default-features --features serde,rand`
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --target ${{ matrix.target }} --features serde,rand
args: --no-default-features --features serde,rand
if: matrix.rust != '1.34.0' # alloc is unstable in 1.34

# everything
Expand All @@ -55,6 +53,50 @@ jobs:
command: check
args: --features serde,deprecated,panicking-api,rand

check-embedded:
name: Type checking on embedded
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.34.0, 1.36.0, stable]
target: [thumbv7em-none-eabihf]

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Cache target
uses: actions/cache@v1
env:
cache-name: target
with:
path: ./target
key: ubuntu-latest-typecheck-target-${{ matrix.rust }}-${{ matrix.target }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true

# ensure `#![no_std]` support
- name: Run `cargo check --no-default-features`
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --target ${{ matrix.target }}
if: matrix.rust != '1.34.0' # alloc is unstable in 1.34

# `#![no_std]` with serde, rand
- name: Run `cargo check --no-default-features --features serde,rand`
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features serde,rand --target ${{ matrix.target }}
if: matrix.rust != '1.34.0' # alloc is unstable in 1.34

test:
name: Test suite
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 070943f

Please sign in to comment.