-
-
Notifications
You must be signed in to change notification settings - Fork 14
58 lines (51 loc) · 1.79 KB
/
ci-test.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: [main]
name: Continuous Integration test
jobs:
build-release:
name: build-release
runs-on: ${{ matrix.job.os }}
env:
RUST_BACKTRACE: 1
strategy:
fail-fast: false
matrix:
rust: [stable]
job:
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-musl", artifact_prefix: "linux-musl", }
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
target: ${{ matrix.job.target }}
profile: minimal # minimal component installation (ie, no documentation)
- name: Installing needed Ubuntu dependencies
if: matrix.job.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev musl-tools xauth xau
case ${{ matrix.job.target }} in
arm-unknown-linux-*) sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
aarch64-unknown-linux-*) sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --verbose --target=${{ matrix.job.target }}
toolchain: ${{ matrix.rust }}
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }}