-
Notifications
You must be signed in to change notification settings - Fork 130
60 lines (54 loc) · 1.73 KB
/
macos-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: macos-build
on:
workflow_dispatch:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build-macos-aarch:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2
- name: Do the stuff on arm64
shell: bash
run: |
mkdir -p artifacts-arm64
cargo build --release --target aarch64-apple-darwin
mv target/aarch64-apple-darwin/release/kanata artifacts-arm64/kanata_macos_arm64
cargo build --release --features cmd --target aarch64-apple-darwin
mv target/aarch64-apple-darwin/release/kanata artifacts-arm64/kanata_macos_cmd_allowed_arm64
- uses: actions/upload-artifact@v3
with:
name: macos-binaries-arm64
path: |
artifacts-arm64/kanata_macos_arm64
artifacts-arm64/kanata_macos_cmd_allowed_arm64
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "persist-cross-job"
- name: Do the stuff on x86-64
shell: bash
run: |
mkdir -p artifacts
cargo build --release
mv target/release/kanata artifacts/kanata_macos_x86_64
cargo build --release --features cmd
mv target/release/kanata artifacts/kanata_macos_cmd_allowed_x86_64
- uses: actions/upload-artifact@v3
with:
name: macos-binaries-x86-64
path: |
artifacts/kanata_macos_x86_64
artifacts/kanata_macos_cmd_allowed_x86_64