Skip to content

Commit

Permalink
add two java workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tvignon-artelys committed Oct 7, 2024
1 parent 8f80b50 commit 8881649
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/amd64_linux_cmake_java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ref: https://github.com/actions/runner-images
name: amd64 Linux CMake Java

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
native:
name: Linux • CMake • Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Swig install
run: |
sudo apt install -y swig
swig -version
- name: Check java
run: java -version
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-DCMAKE_BUILD_TYPE=Release
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
-DBUILD_JAVA=ON -DSKIP_GPG=ON
-DCMAKE_INSTALL_PREFIX=install
- name: Build
run: >
cmake --build build
--config Release
--target all
-v -j2
- name: Test
run: >
CTEST_OUTPUT_ON_FAILURE=1
cmake --build build
--config Release
--target test
-v
- name: Install
run: >
cmake --build build
--config Release
--target install
-v
55 changes: 55 additions & 0 deletions .github/workflows/amd64_windows_cmake_java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ref: https://github.com/actions/runner-images
name: amd64 Windows CMake Java

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
native:
strategy:
matrix:
cmake: [
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • Java
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install SWIG 4.1.1
run: |
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.1.1.zip","swigwin-4.1.1.zip");
Expand-Archive .\swigwin-4.1.1.zip .;
echo "$((Get-Item .).FullName)/swigwin-4.1.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Check swig
run: swig -version
- name: Check java
run: java -version
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-G "${{ matrix.cmake.generator }}"
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
-DBUILD_JAVA=ON
- name: Build
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.build_target }}
-v -j2
- name: Test
run: >
CTEST_OUTPUT_ON_FAILURE=1
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.test_target }}
-v
- name: Install
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.install_target }}
-v

0 comments on commit 8881649

Please sign in to comment.