Skip to content

Commit

Permalink
Add GitHub Actions build script
Browse files Browse the repository at this point in the history
  • Loading branch information
hunyadi committed Nov 15, 2024
1 parent 21f8a56 commit 1c2c8b8
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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: '8'
- 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/[email protected]
- name: Set up JDK for JNI headers
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
- 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
- name: Compile and run Java sources
run: |
launch.bat

0 comments on commit 1c2c8b8

Please sign in to comment.