Skip to content

Commit 29723b4

Browse files
committed
wip: macos test
1 parent ce4f8db commit 29723b4

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/macos-test.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
if: steps.cache-libs.outputs.cache-hit != 'true'
6868
run: |
6969
unset ANDROID_NDK_HOME
70-
python build.py build --desktop cpu --opencv cmake -vv
70+
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
7171
7272
- name: Package
7373
run: |
@@ -86,6 +86,36 @@ jobs:
8686
path: /private/var/tmp/_bazel_runner
8787
key: bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
8888

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

0 commit comments

Comments
 (0)