-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.61 KB
/
tests.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
on:
push:
branches:
- "**" # All branches
- "!docs" # Exclude branch "docs"
name: tests
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
build: [x86_64, armv7, aarch64]
include:
- build: x86_64
toolchain: stable
target: x86_64-unknown-linux-gnu
cross: false
strip_bin: strip
- build: armv7
toolchain: stable
target: armv7-unknown-linux-gnueabihf
cross: true
cross_helpers: gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
strip_bin: arm-linux-gnueabihf-strip
- build: aarch64
toolchain: stable
target: aarch64-unknown-linux-gnu
cross: true
cross_helpers: gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
strip_bin: aarch64-linux-gnu-strip
steps:
- name: Install Linker
if: ${{ matrix.cross }}
run: |
sudo apt update
sudo apt install ${{ matrix.cross_helpers }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
#override: true
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features --locked --target ${{ matrix.target }}
use-cross: ${{ matrix.cross }}
# Author: Blurgy <gy@blurgy.xyz>
# Date: Oct 07 2021, 00:39 [CST]