-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.38 KB
/
build_artifacts.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
name: Build and upload binaries
on: [push]
# pull_request:
# branches: [main]
jobs:
build_linux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Compile
id: compile
uses: rust-build/[email protected]
with:
ARCHIVE_TYPES: tar.gz
RUSTTARGET: x86_64-unknown-linux-musl
EXTRA_FILES: "COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md"
TOOLCHAIN_VERSION: stable-2024-09-05
UPLOAD_MODE: none
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Binary
path: |
${{ steps.compile.outputs.BUILT_ARCHIVE }}
${{ steps.compile.outputs.BUILT_CHECKSUM }}
build_macOS-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Compile
id: compile
uses: rust-build/[email protected]
with:
ARCHIVE_TYPES: tar.gz
RUSTTARGET: x86_64-apple-darwin
EXTRA_FILES: "COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md"
TOOLCHAIN_VERSION: stable-2024-09-05
UPLOAD_MODE: none
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Binary
path: |
${{ steps.compile.outputs.BUILT_ARCHIVE }}
${{ steps.compile.outputs.BUILT_CHECKSUM }}
build_macOS-arm64:
runs-on: ubuntu-latest
container: ghcr.io/shepherdjerred/macos-cross-compiler:latest
steps:
- name: Install wget and git
id: install-wget
run: apt-get update && apt install -y wget git
- name: Create io directory
id: mkdir-io
run: mkdir /io && cd /io
- name: Download build script
id: dl-build-script
run: wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/.github/deploy/build_aarch64-apple-darwin.sh
- name: Compile binary in macOS Cross Compiler container
id: compile-in-container
run: chmod +x build_aarch64-apple-darwin.sh && ./build_aarch64-apple-darwin.sh ${{ github.ref_name }} arm64
- name: Upload macOS-arm64 binary
if: success()
uses: actions/upload-artifact@v4
with:
name: sablast-${{ github.ref_name }}-aarch64-apple-darwin
path: /io/sablast-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz