-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (50 loc) · 1.47 KB
/
build.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
name: Build
on:
push:
branches: [ "main" ]
jobs:
build:
name: Binaries for ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
name:
- linux-x86-64-gnu
- linux-armv7-gnu
- linux-arm64-gnu
- linux-x86-64-musl
- linux-arm64-musl
include:
- name: linux-x86-64-gnu
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
platform: ~
cross: false
- name: linux-armv7-gnu
os: ubuntu-22.04
target: armv7-unknown-linux-gnueabihf
platform: ~
cross: true
- name: linux-arm64-gnu
os: ubuntu-22.04
target: aarch64-unknown-linux-gnu
platform: ~
cross: true
- name: linux-x86-64-musl
os: ubuntu-22.04
target: x86_64-unknown-linux-musl
platform: amd64
cross: true
- name: linux-arm64-musl
os: ubuntu-22.04
target: aarch64-unknown-linux-musl
platform: arm64
cross: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install cross --git https://github.com/cross-rs/cross || true
- name: Build
if: ${{ !matrix.cross }}
run: cargo build --release --target ${{ matrix.target }} --manifest-path Cargo.toml