From 76527b09e0bfcb0e70c63f46a094209f78ed4687 Mon Sep 17 00:00:00 2001 From: Rongmario Date: Sun, 11 Feb 2024 01:28:47 +0000 Subject: [PATCH] MacOS x64 --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8e179d..e83dfe7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,4 +68,32 @@ jobs: uses: actions/upload-artifact@v3 with: name: native - path: output/ \ No newline at end of file + path: output/ + + mac_os_compile: + runs-on: macos-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Make Directory + run: mkdir output + + - name: Install Java 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Compile + run: gcc -c -fPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin ${{ env.PATH_TO_CODE }}.c -o ${{ env.PATH_TO_CODE }}_x64.o + + - name: Link + run: gcc -dynamiclib -o output/${{ env.LIB_NAME }}_x64.dylib ${{ env.PATH_TO_CODE }}_x64.o -lc + + - name: Upload Natives + uses: actions/upload-artifact@v3 + with: + name: native + path: output/ +