aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..9eef849
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,49 @@
+name: CI
+
+on:
+ - push
+ - pull_request
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - beta
+ - nightly
+ - 1.20.0 # MSRV
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: ${{ matrix.rust }}
+ override: true
+ - name: Build
+ run: cargo build
+ - name: Run tests
+ run: cargo test
+ - name: Run tests (without default features)
+ run: cargo test --no-default-features
+
+ no_std:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Test no_std support
+ run: |
+ rustup target add thumbv6m-none-eabi
+ cargo build --no-default-features --target thumbv6m-none-eabi
+
+ format:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Check formatting
+ run: cargo fmt -- --check