-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (27 loc) · 1.02 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Cargo build and test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build with default features
run: cargo build --verbose
# Install a toolchain without std, used for no_std builds.
- name: Install thumbv8m.main-none-eabihf toolchain
run: rustup target add thumbv8m.main-none-eabihf
- name: no_std build, sysex feature enabled
run: cargo build --verbose --target=thumbv8m.main-none-eabihf --no-default-features --features=sysex
- name: no_std build, sysex feature not enabled
run: cargo build --verbose --target=thumbv8m.main-none-eabihf --no-default-features
# Install alsa, which is needed by the dev dependency midir that gets built when running cargo test
- name: Install alsa
run: sudo apt-get install -y libasound2-dev
- name: Run tests
run: cargo test --verbose