Skip to content

Commit 6f42e11

Browse files
committed
wip: macos test
1 parent ce4f8db commit 6f42e11

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/macos-test.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
with:
2323
ref: ${{ inputs.ref }}
2424

25+
- name: Select Xcode Version
26+
run: |
27+
sudo xcode-select -s '/Applications/Xcode_16.app/Contents/Developer'
28+
2529
# Cache built libraries
2630
- name: Concat native library source files
2731
run: |
@@ -67,7 +71,7 @@ jobs:
6771
if: steps.cache-libs.outputs.cache-hit != 'true'
6872
run: |
6973
unset ANDROID_NDK_HOME
70-
python build.py build --desktop cpu --opencv cmake -vv
74+
python build.py build --desktop cpu --opencv cmake --macos_universal --bazel_build_opts='--macos_minimum_os=13.0 --host_macos_minimum_os=13.0 --subcommands=pretty_print' -vv
7175
7276
- name: Package
7377
run: |
@@ -86,6 +90,36 @@ jobs:
8690
path: /private/var/tmp/_bazel_runner
8791
key: bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
8892

93+
check:
94+
runs-on: macos-13
95+
needs: build
96+
steps:
97+
- name: Download built artifacts
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: macos-package
101+
102+
- name: Check
103+
run: |
104+
tar xvf artifacts.tar
105+
otool -L Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib
106+
107+
- name:
108+
run: |
109+
cat << EOF > test.c
110+
#include <stdio.h>
111+
#include <dlfcn.h>
112+
113+
int main(int argc, char *argv[]) {
114+
void *handle = dlopen("Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib", RTLD_NOW);
115+
printf("handle: %lx\n", (long) handle);
116+
printf("##### dlerror=%s\n",dlerror());
117+
}
118+
EOF
119+
120+
cc test.c
121+
./a.out
122+
89123
test:
90124
runs-on: ${{ matrix.os }}
91125
needs: build

0 commit comments

Comments
 (0)