forked from Rockbox/rockbox
-
-
Notifications
You must be signed in to change notification settings - Fork 4
98 lines (82 loc) · 2.87 KB
/
Copy pathmacos-intel-build.yml
File metadata and controls
98 lines (82 loc) · 2.87 KB
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
98
name: macos-intel-ci
# Lightweight CI build on every master push — no release upload.
# Release artifacts (tarball, pkg, DMG) are produced by macos-build.yml on tag push.
on:
push:
branches:
- master
workflow_dispatch:
inputs:
tag:
description: "Version / tag label for the artifact (e.g. 2026.06.25)"
type: string
required: false
jobs:
build:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
zig/.zig-cache
target
key: macos-15-intel-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: macos-15-intel-cargo-
- name: Install LLVM@21
run: |
brew install llvm@21 cmake protobuf
echo "/opt/homebrew/opt/llvm@21/bin:/usr/local/opt/llvm@21/bin" >> $GITHUB_PATH
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: denoland/setup-deno@v2
- name: Rust flags
run: echo "RUSTFLAGS=-A warnings" >> $GITHUB_ENV
- name: Build Web UI
run: |
cd webui/rockbox
deno install
deno run build
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install admin UI dependencies
working-directory: crates/s3/s3webui
run: bun install --frozen-lockfile
- name: Build admin UI
# Must run before any rockbox-server / rockbox-cli build:
# rust-embed in crates/s3/src/admin.rs reads crates/s3/s3webui/dist/
# at compile time. The directory is gitignored, so without this step
# the embedded admin UI is empty in the final binary.
working-directory: crates/s3/s3webui
run: bun run build
- name: Build rockboxd (headless)
run: bash scripts/build-headless.sh
- name: Build rockbox CLI
run: cargo build -p rockbox --release
- name: Clean build artifacts
run: |
mkdir -p /tmp/rb-bins
cp target/release/rockbox /tmp/rb-bins/
cp zig/zig-out/bin/rockboxd /tmp/rb-bins/
rm -rf target build-lib build-headless zig/.zig-cache
mkdir -p target/release zig/zig-out/bin
mv /tmp/rb-bins/rockbox target/release/rockbox
mv /tmp/rb-bins/rockboxd zig/zig-out/bin/rockboxd
- name: Verify binaries
run: ls -lh target/release/rockbox zig/zig-out/bin/rockboxd
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rockbox-macos-intel${{ inputs.tag && format('-{0}', inputs.tag) || '' }}
path: |
target/release/rockbox
zig/zig-out/bin/rockboxd