mirror of
https://github.com/trussed-dev/delog.git
synced 2026-06-20 04:16:34 -07:00
Setup CI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user