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: cross-build
on:
push:
branches:
- "**"
jobs:
cross-compile:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
artifact_name: spellout
asset_name: spellout-0.1.0_linux_arm64
ext: ''
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: spellout
asset_name: spellout-0.1.0_linux_amd64
ext: ''
# - os: ubuntu-latest
# target: aarch64-pc-windows-gnullvm
# artifact_name: ${{ needs.documents.outputs.appname }}-cli.exe
# asset_name: ${{ needs.documents.outputs.appname }}-${{ needs.documents.outputs.tag }}_windows_arm64
# ext: '.exe'
# - os: ubuntu-latest
# target: x86_64-pc-windows-gnu
# artifact_name: ${{ needs.documents.outputs.appname }}-cli.exe
# asset_name: ${{ needs.documents.outputs.appname }}-${{ needs.documents.outputs.tag }}_windows_amd64
# ext: '.exe'
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: spellout
asset_name: spellout-0.1.0_darwin_arm64
ext: ''
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: spellout
asset_name: spellout-0.1.0_darwin_amd64
ext: ''
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Setup zig
uses: mlugg/setup-zig@v2
- name: build
run: |
rustup update stable
rustup target add ${{ matrix.target }}
cargo install cargo-zigbuild
cargo zigbuild --release --target ${{ matrix.target }}