This commit is contained in:
Nicolas Stalder
2020-11-27 19:21:47 +01:00
parent b66b13d4c0
commit 0e6917fecf
+68
View File
@@ -0,0 +1,68 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
QEMU_TARGET: thumbv8m.main-none-eabi
jobs:
test:
strategy:
matrix:
rust:
- stable
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Check that all crates build without warning
run: RUSTFLAGS='--deny warnings' cargo check --all
- name: Run doc and lib tests
run: |
cargo test --lib
cargo test --doc
- name: Run examples as test (needs `std` feature)
run: cargo test --features std
qemu-test:
strategy:
matrix:
rust:
- stable
# ubuntu-latest still points to 18.04, which only has QEMU 2
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ env.QEMU_TARGET }}
override: true
- name: Install QEMU (need >= 4)
run: |
sudo apt-get update -qq >/dev/null
sudo apt-get install -qq qemu-system-arm >/dev/null
qemu-system-arm --version
- name: Build the QEMU tests
working-directory: qemu-tests
run: make build build-release
- name: Run the QEMU tests
working-directory: qemu-tests
run: make test