-
Notifications
You must be signed in to change notification settings - Fork 23
97 lines (82 loc) · 2.61 KB
/
builds.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: ⚃ Builds
on:
workflow_dispatch:
inputs:
force-builds:
required: true
type: boolean
description: Publish Builds at Anytime
pull_request:
branches: [ '**' ]
# workflow_run:
# workflows: [ 𝌚 Release ]
# branches: [main]
# types: [ completed ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
builds:
strategy:
matrix:
platform:
- release_for: FreeBSD-x86_64
os: ubuntu-latest
target: x86_64-unknown-freebsd
bin: homestar
name: homestar-FreeBSD-x86_64.tar.gz
command: build
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: homestar
name: homestar-Linux-x86_64-musl.tar.gz
# - os_name: Linux-aarch64
# os: ubuntu-latest
# target: aarch64-unknown-linux-musl
# bin: homestar
# name: homestar-Linux-aarch64-musl.tar.gz
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: homestar.exe
name: homestar-Windows-x86_64.zip
command: both
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: homestar
name: homestar-Darwin-x86_64.tar.gz
command: both
- release_for: macOS-Arm
os: macOS-latest
target: aarch64-apple-darwin
bin: homestar
name: homestar-Darwin-aarch64.tar.gz
command: both
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: check-${{ matrix.platform.target }}-${{ matrix.platform.os }}
save-if: ${{ github.event_name == 'push' }}
- name: Use mold-linker
if: ${{ matrix.platform.os == 'ubuntu-latest' }}
uses: rui314/setup-mold@v1
- name: Build Binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "-p homestar-runtime --locked --release"
strip: true
- name: Publish Release Artifacts
uses: actions/upload-artifact@v3
with:
name: hometar-${{ matrix.platform.os_name }}
path: "homestar-*"
if-no-files-found: error