From ed5d51d80f34dad43c7b719d8847848c9ae427d4 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Thu, 16 Nov 2023 15:08:03 -0600 Subject: [PATCH] testing GitHub action build on MacOS --- .github/workflows/onyx-build.yml | 13 +++++++++++++ build.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/onyx-build.yml b/.github/workflows/onyx-build.yml index 5bf3ded6..32e4116a 100644 --- a/.github/workflows/onyx-build.yml +++ b/.github/workflows/onyx-build.yml @@ -33,6 +33,10 @@ jobs: os: ubuntu-latest runtime_library: none artifact_name: 'onyx-linux-none-amd64' + - build: darwin-arm64 + os: macos-11.0 + runtime_library: none + artifact_name: 'onyx-darwin-none-arm64' - build: windows-amd64 os: windows-latest artifact_name: 'onyx-windows-amd64' @@ -84,6 +88,15 @@ jobs: ONYX_ARCH: x86_64 ONYX_INCLUDE_DIR: ../shared/include + - name: Build Onyx for ${{ matrix.build }} + if: (matrix.build == 'darwin-arm64') && (matrix.runtime_library == 'none') + run: | + ./build.sh compile package + env: + ONYX_CC: gcc + ONYX_ARCH: arm64 + ONYX_INCLUDE_DIR: ../shared/include + - name: Build Onyx for ${{ matrix.build }} if: matrix.build == 'windows-amd64' run: | diff --git a/build.sh b/build.sh index e77e0358..ce2addd9 100755 --- a/build.sh +++ b/build.sh @@ -42,7 +42,7 @@ package_all() { mkdir -p "$DIST_DIR/lib" mkdir -p "$DIST_DIR/include" - cp runtime/onyx_runtime.so "$DIST_DIR/lib/" + [ -f runtime/onyx_runtime.so ] && cp runtime/onyx_runtime.so "$DIST_DIR/lib/" cp "shared/include/onyx_library.h" "$DIST_DIR/include/onyx_library.h" cp "shared/include/wasm.h" "$DIST_DIR/include/wasm.h" -- 2.25.1