-
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (53 loc) · 1.43 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
name: Build
on:
workflow_call:
push:
branches: [main]
tags-ignore:
- "**"
pull_request:
branches: [main]
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- "x86_64-unknown-linux-musl"
- "aarch64-unknown-linux-musl"
- "x86_64-pc-windows-msvc"
- "x86_64-apple-darwin"
- "aarch64-apple-darwin"
include:
- target: "x86_64-unknown-linux-musl"
runner: ubuntu-latest
- target: "aarch64-unknown-linux-musl"
runner: ubuntu-latest
- target: "x86_64-pc-windows-msvc"
runner: windows-latest
- target: "x86_64-apple-darwin"
runner: macos-latest
- target: "aarch64-apple-darwin"
runner: macos-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Build
id: build
shell: bash
run: ./scripts/build.sh
env:
TARGET: ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: kittysay-${{ matrix.target }}
path: ${{ steps.build.outputs.path }}