Skip to content

removed obsolete code #33

removed obsolete code

removed obsolete code #33

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java Native Build 25
on:
push:
branches:
- '**'
pull_request:
branches: [ main ]
jobs:
build-native:
name: Build JNI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
ext: so
build-cmd: |
sudo apt-get update && sudo apt-get install -y cmake gcc g++
cd nativememory
mkdir build && cd build
cmake .. && cmake --build .
cp ../target/libs/libEclipseStoreNativeMemory.so ../libEclipseStoreNativeMemory-linux-x86_64.so
- os: ubuntu-latest
ext: so
arch: arm64
build-cmd: |
sudo apt-get update
sudo apt-get install -y cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
cd nativememory
mkdir build && cd build
cmake .. \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
cmake --build .
cp ../target/libs/libEclipseStoreNativeMemory.so ../libEclipseStoreNativeMemory-linux-arm64.so
- os: windows-latest
arch: x86_64
ext: dll
build-cmd: |
cd nativememory
mkdir build
cd build
cmake .. && cmake --build . --config Release
copy ..\target\libs\Release\EclipseStoreNativeMemory.dll ..\libEclipseStoreNativeMemory-windows-x86_64.dll
- os: macos-latest
arch: x86_64
ext: dylib
build-cmd: |
cd nativememory
mkdir build && cd build
cmake .. && cmake --build .
cp ../target/libs/libEclipseStoreNativeMemory.dylib ../libEclipseStoreNativeMemory-macos-x86_64.dylib
- os: macos-latest
arch: arm64
ext: dylib
build-cmd: |
cd nativememory
mkdir build && cd build
cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build .
cp ../target/libs/libEclipseStoreNativeMemory.dylib ../libEclipseStoreNativeMemory-macos-arm64.dylib
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 25
distribution: temurin
- name: Generate JNI headers
run: mvn compile --no-transfer-progress
- name: Build native library
run: ${{ matrix.build-cmd }}
- name: Upload native library
uses: actions/upload-artifact@v4
with:
name: native-${{ matrix.os }}-${{ matrix.arch || 'x86_64' }}
path: nativememory/libEclipseStoreNativeMemory-*.${{ matrix.ext }}
package-jar:
name: Package all natives into one JAR
runs-on: ubuntu-latest
needs: build-native
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 25
distribution: temurin
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: nativememory/target/libs
merge-multiple: 'true'
- name: build final JAR
run: |
mvn -pl nativememory -am -Ppackage-natives -P '!native-build' package --no-transfer-progress
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: final-jar
path: nativememory/target/nativememory-*.jar