-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.17 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
name: Build
on:
push:
branches: ["main"]
tags-ignore:
- "**"
pull_request:
workflow_call:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- "x86_64-apple-darwin"
- "aarch64-apple-darwin"
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-auditable
run: cargo install cargo-auditable
- name: Build
run: cargo auditable build --release --locked --target ${{ matrix.target }}
env:
CARGO_PROFILE_RELEASE_LTO: "fat"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
- name: Rename artifact
run: cp ./target/${{ matrix.target }}/release/am ./am-${{ matrix.target }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: am-${{ matrix.target }}
path: ./am-${{ matrix.target }}