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
# Test the build for MacOS universal binaries
#
on: workflow_dispatch
name: Build MacOS universal binary
# This is currently needed to build the http3 functionality in the reqwest crate
env:
RUSTFLAGS: '--cfg reqwest_unstable'
jobs:
build-universal:
runs-on: macos-26
steps:
- uses: actions/checkout@v7.0.0
with:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1.17.0
with:
targets: x86_64-apple-darwin,aarch64-apple-darwin
- uses: mlugg/setup-zig@v2
- run: |
brew install protobuf
cargo install --locked cargo-zigbuild
cargo zigbuild --release --target universal2-apple-darwin
# podman pull docker.io/messense/cargo-zigbuild
# podman run --rm \
# -v ${GITHUB_WORKSPACE}:/io \
# -w /io docker.io/messense/cargo-zigbuild \
# brew install cmake && \
# cargo zigbuild --release --target universal2-apple-darwin