Skip to content

Commit 697cb9e

Browse files
committed
Update CI config
1 parent 4633772 commit 697cb9e

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,61 @@ jobs:
114114
VERSION: ${{ needs.create-release.outputs.version }}
115115
run: |
116116
gh release upload ${VERSION} mrbind-linux-$(uname -m).zip --clobber
117+
118+
build-macos:
119+
needs:
120+
- create-release
121+
runs-on: ${{ matrix.runner }}
122+
strategy:
123+
fail-fast: false
124+
matrix: [arm64, x64]
125+
include:
126+
- arch: arm64
127+
runner: macos-15
128+
- arch: x64
129+
runner: macos-15-intel
130+
131+
steps:
132+
- name: Checkout
133+
uses: actions/checkout@v6
134+
with:
135+
submodules: true
136+
137+
- name: Build
138+
run: |
139+
export PATH="$(brew --prefix llvm@18)/bin:$PATH"
140+
cmake -B build -G Ninja \
141+
-D Clang_DIR=$(brew --prefix llvm@18)/lib/cmake/clang \
142+
-D CMAKE_BUILD_TYPE=Release \
143+
-D MRBIND_STATIC_BUILD=ON \
144+
-D MRBIND_FORCE_LLVM_STATIC=ON \
145+
-D CMAKE_PREFIX_PATH=$(brew --prefix zstd) \
146+
-D CMAKE_OSX_DEPLOYMENT_TARGET=12.0
147+
cmake --build build --parallel $(sysctl -n hw.logicalcpu)
148+
149+
- name: Verify build
150+
run: |
151+
ls -l build/mrbind*
152+
otool -L build/mrbind*
153+
vtool -show-build build/mrbind*
154+
155+
- name: Test
156+
run: |
157+
export CLANG_RESOURCE_DIR=$(brew --prefix llvm@18)/lib/clang/18
158+
echo clang++ > examples/cxx.txt
159+
examples/c/run.sh
160+
PYTHON=python3.10 examples/python/run.sh
161+
162+
- name: Create package
163+
run: |
164+
mkdir mrbind
165+
mv build/mrbind{,_gen_c,_gen_csharp} mrbind/
166+
cp -R $(brew --prefix llvm@18)/lib/clang/18 mrbind/resource-dir
167+
zip -r mrbind-macos-$(uname -m).zip mrbind/
168+
169+
- name: Upload package
170+
env:
171+
GH_TOKEN: ${{ github.token }}
172+
VERSION: ${{ needs.create-release.outputs.version }}
173+
run: |
174+
gh release upload ${VERSION} mrbind-macos-$(uname -m).zip --clobber

0 commit comments

Comments
 (0)