-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (71 loc) · 2.15 KB
/
Copy pathbuild.yaml
File metadata and controls
83 lines (71 loc) · 2.15 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
name: Build Binaries
on:
workflow_run:
workflows: ["Tests"]
types: [completed]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
include:
- os: ubuntu-24.04
name: linux
arch: amd64
- os: ubuntu-24.04-arm
name: linux
arch: arm64
- os: windows-latest
name: windows
arch: amd64
- os: macos-latest
name: macos
arch: arm64
- os: macos-15-intel
name: macos
arch: amd64
steps:
- uses: actions/checkout@v6
- name: Build binary (Linux in Ubuntu 26.04 container)
if: matrix.name == 'linux'
shell: bash
run: |
# Docker container with Ubuntu 26.04 and build the binary inside it
rm -rf dist/*
docker run --rm \
-v "$PWD:/workspace" \
-w /workspace \
ubuntu:26.04 \
bash -c "
set -e
echo 'Setting up Ubuntu 26.04 build environment...'
apt-get update -y
apt-get install -y --fix-missing curl python3 python3-pip python3-venv binutils
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH=\"\$HOME/.local/bin:\$PATH\"
echo 'Building binary with uv...'
uv sync
uv run build.py
echo 'Build completed. Checking output:'
ls -la dist/
"
- name: Setup uv for Windows/macOS
if: matrix.name != 'linux'
uses: astral-sh/setup-uv@v7
- name: Build binary (Windows/macOS native)
if: matrix.name != 'linux'
shell: bash
run: |
rm -rf dist/*
uv sync
uv run build.py
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: bzm-mcp-${{ matrix.name }}-${{ matrix.arch }}
path: dist/