-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1010 Bytes
/
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
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Build
jobs:
build:
name: Build
strategy:
matrix:
include:
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
cross: true
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
cross: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Cargo Toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: build-${{ matrix.target }}-${{ github.ref }}
- name: Build
if: "! matrix.cross"
run: cargo build --release --workspace --target ${{ matrix.target }}
- name: Setup Cross Toolchain
if: matrix.cross
uses: taiki-e/install-action@cross
- name: Build (cross)
if: matrix.cross
run: cross build --release --workspace --target ${{ matrix.target }}