Skip to content

Commit

Permalink
Windows x64, x86, arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 10, 2024
1 parent 6a78242 commit 4bfb95e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ jobs:
- name: Link for x86
run: gcc -m32 -shared -fPIC -o output/${{ env.LIB_NAME }}_x86.so ${{ env.PATH_TO_CODE }}_x86.o -lc

- name: Upload Natives
uses: actions/upload-artifact@v3
with:
name: native
path: output/

windows_compile:
strategy:
matrix:
arch: [[x64, x64], [x86, x86], [amd64_arm64, arm64]]
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Make Directory
run: mkdir output

- name: Install MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch[0] }}

- name: Compile and Link for ${{ matrix.arch[1] }}
run: cl.exe -LD -I$JAVA_HOME/include -I$JAVA_HOME/include/win32 ${{ env.PATH_TO_CODE }}.c -link -out:output/${{ env.LIB_NAME }}_${{ matrix.arch[1] }}.dll

- name: Upload Natives
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 4bfb95e

Please sign in to comment.