@@ -19,13 +19,11 @@ jobs:
1919 build :
2020 if : github.repository == 'Hebbian-Robotics/rua'
2121 strategy :
22+ fail-fast : false
2223 matrix :
23- os : [ubuntu-24.04]
24+ os : [ubuntu-24.04, macos-15, macos-15-intel ]
2425 runs-on : ${{ matrix.os }}
2526 timeout-minutes : 60
26- env :
27- CC : clang-21
28- CXX : clang++-21
2927 steps :
3028 - uses : actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
3129 with :
3432 with :
3533 version : " 0.13.6"
3634 python-version : " 3.14"
35+ enable-cache : true
3736 - name : Verify the release tag matches the package version
3837 env :
3938 RELEASE_TAG : ${{ github.event.release.tag_name }}
@@ -43,21 +42,48 @@ jobs:
4342 echo "Release tag ${RELEASE_TAG} must equal v${package_version}." >&2
4443 exit 1
4544 fi
46- - name : Install native build tools
45+ - name : Install Linux build tools
46+ if : runner.os == 'Linux'
4747 run : |
4848 curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm.gpg
4949 echo 'deb [signed-by=/usr/share/keyrings/llvm.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-21 main' | sudo tee /etc/apt/sources.list.d/llvm.list
5050 sudo apt-get update
5151 sudo apt-get install -y pkg-config mold libudev-dev libglib2.0-dev clang-21 libclang-21-dev ffmpeg
52+ {
53+ echo 'CC=clang-21'
54+ echo 'CXX=clang++-21'
55+ } >> "$GITHUB_ENV"
56+ - name : Install macOS build tools
57+ if : runner.os == 'macOS'
58+ run : |
59+ brew install ffmpeg pkg-config
60+ {
61+ echo 'CC=clang'
62+ echo 'CXX=clang++'
63+ echo 'MACOSX_DEPLOYMENT_TARGET=14.0'
64+ echo 'TMPDIR=/tmp'
65+ } >> "$GITHUB_ENV"
66+ - name : Restore Rust build cache
67+ uses : Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
68+ with :
69+ shared-key : release-${{ matrix.os }}
70+ env-vars : CC CXX MACOSX_DEPLOYMENT_TARGET
71+ save-if : ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
5272 - name : Check source and generated contracts
5373 run : |
5474 uv run --locked rua-dev setup
5575 uv run --locked rua-dev validate --lane python
5676 uv run --locked rua-dev contracts --check
57- - name : Build and repair the release wheel
77+ - name : Build the release wheel
78+ run : uv run --locked rua-dev package rua
79+ - name : Repair Linux libraries
80+ if : runner.os == 'Linux'
5881 run : |
59- uv run --locked rua-dev package rua
6082 uvx --with patchelf auditwheel repair --plat manylinux_2_39_x86_64 --wheel-dir dist/repaired dist/hebbian_rua-*.whl
83+ - name : Bundle macOS libraries
84+ if : runner.os == 'macOS'
85+ run : |
86+ uvx --from delocate delocate-wheel --require-archs "$(uname -m)" --wheel-dir dist/repaired dist/hebbian_rua-*.whl
6187 - name : Upload wheels for installation checks
6288 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
6389 with :
@@ -69,20 +95,20 @@ jobs:
6995 needs : build
7096 strategy :
7197 matrix :
72- python : ["3.12", "3.14" ]
73- runs-on : ubuntu-24.04
98+ os : [ubuntu-24.04, macos-15, macos-15-intel ]
99+ runs-on : ${{ matrix.os }}
74100 steps :
75101 - uses : actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
76102 with :
77103 persist-credentials : false
78104 - uses : astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
79105 with :
80106 version : " 0.13.6"
81- python-version : ${{ matrix.python }}
107+ python-version : " 3.14"
108+ enable-cache : true
82109 - uses : actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
83110 with :
84- pattern : rua-wheels-*
85- merge-multiple : true
111+ name : rua-wheels-${{ matrix.os }}
86112 path : dist/repaired
87113 - name : Verify a clean wheel installation and simulator connection
88114 run : |
0 commit comments