From 29723b479e51b909f5a9aed1bd9c48a9dd3e66bf Mon Sep 17 00:00:00 2001 From: Junrou Nishida Date: Tue, 31 Dec 2024 17:59:22 +0900 Subject: [PATCH] wip: macos test --- .github/workflows/macos-test.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index d4865820a..ccb8cba0f 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -67,7 +67,7 @@ jobs: if: steps.cache-libs.outputs.cache-hit != 'true' run: | unset ANDROID_NDK_HOME - python build.py build --desktop cpu --opencv cmake -vv + 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 - name: Package run: | @@ -86,6 +86,36 @@ jobs: path: /private/var/tmp/_bazel_runner key: bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }} + check: + runs-on: macos-13 + needs: build + steps: + - name: Download built artifacts + uses: actions/download-artifact@v4 + with: + name: macos-package + + - name: Check + run: | + tar xvf artifacts.tar + otool -L Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib + + - name: + run: | + cat << EOF > test.c + #include + #include + + int main(int argc, char *argv[]) { + void *handle = dlopen("Packages/com.github.homuler.mediapipe/Runtime/Plugins/libmediapipe_c.dylib", RTLD_NOW); + printf("handle: %lx\n", (long) handle); + printf("##### dlerror=%s\n",dlerror()); + } + EOF + + cc test.c + ./a.out + test: runs-on: ${{ matrix.os }} needs: build