-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (60 loc) · 1.65 KB
/
ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: Build macOS, Ubuntu, Windows
"on":
pull_request: ~
push:
branches: ["master", "main"]
jobs:
release:
name: Target ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
profile: dev+static
target: x86_64-unknown-linux-musl
needs_musl: true
- os: ubuntu-latest
profile: dev+static+aarch64
target: aarch64-unknown-linux-musl
needs_musl: true
- os: macos-11
profile: dev+mac
target: x86_64-apple-darwin
- os: macos-11
profile: dev+mac+aarch64
target: aarch64-apple-darwin
- os: windows-2022
profile: dev+windows
target: x86_64-pc-windows-msvc
suffix: .exe
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Setup cargo make
uses: davidB/rust-cargo-make@v1
- name: Install musl tools
if: matrix.needs_musl
run: >-
sudo apt-get update &&
sudo apt-get install
clang
llvm
musl-tools
gcc-aarch64-linux-gnu
g++-aarch64-linux-gnu
binutils-aarch64-linux-gnu
qemu-user
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
profile: minimal
default: true
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: cargo make --profile ${{ matrix.profile }} build