📦 [javabind] Build and test C++ library #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 📦 [javabind] Build and test C++ library | |
on: | |
push: | |
paths: | |
- /include/** | |
- /java/** | |
- /test/** | |
workflow_dispatch: {} | |
jobs: | |
build-linux: | |
name: 🧱 [Linux] Build and test C++ library | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK for JNI headers | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '14' | |
- name: Set up build environment | |
run: | | |
cmake -E make_directory ${{github.workspace}}/build | |
- name: Compile C++ sources | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cmake .. && make | |
- name: Compile and run Java sources | |
run: | | |
./launch.sh | |
build-windows: | |
name: 🧱 [Windows] Build and test C++ library | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Set up JDK for JNI headers | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '14' | |
- name: Set up build environment | |
run: | | |
cmake -E make_directory ${{github.workspace}}/build | |
- name: Compile C++ sources | |
shell: cmd | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cmake .. && msbuild javabind.sln | |
- name: Compile and run Java sources | |
run: | | |
launch.bat |