Skip to content

Commit

Permalink
MacOS x64
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 11, 2024
1 parent 3b1f4e2 commit 76527b0
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,32 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: native
path: output/
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/

0 comments on commit 76527b0

Please sign in to comment.