Skip to content

Commit

Permalink
590 new runner ubuntu 2004 on arm64 (#591)
Browse files Browse the repository at this point in the history
* added workflow for MacOS on ARM and added PORTABLE=1 for building rocksdbjavastatic on Mac i86

* added build for libspeedbjni-linux-aarch64.so to the build_and_publish_jar.yml

* deleted sleep comment
  • Loading branch information
maxb-io authored Jul 3, 2023
1 parent a785634 commit 0e1971c
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 9 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/bld_java_ubu_arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build Speedb on a Mac OS server
#
# This workflow assumes the self hosted runner on a Mac machine is ready.
# The Mac OS server must have all the tools and software required for Speedb building to be installed


name: Build on Ubuntu Arm

on:
workflow_call:
inputs:
verSion:
required: true
type: string
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuArm64 # a test self hosted runner on a vm with MacOS
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3

- name: 'build'
run: |
export JAVA_HOME=$(jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));')
PORTABLE=1 DEBUG_LEVEL=0 make -j $(nproc) rocksdbjavastatic
- name: 'upload artifacts' #This step executed only when this workflow is called by another and a version is provided
if: inputs.verSion != ' '
run: aws s3 cp java/target/libspeedbjni-linux-aarch64.so s3://spdb-builder/jar_test/v${{ inputs.verSion }}/libspeedbjni-linux-aarch64.so
29 changes: 21 additions & 8 deletions .github/workflows/build_and_publish_jar.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# This workflow will build Speedb on a Mac OS server
# This workflow will build Speedb library on Mac i86 and ARM, Ubuntu i86 and Arm, Windows i86. Then build a jar and publish to Maven central
#
# This workflow assumes the self hosted runner on a Windows machine is ready.
# The Mac OS server must have all the tools and software required for Speedb building to be installed


name: build all and publish jar

Expand Down Expand Up @@ -42,6 +39,18 @@ jobs:
with:
verSion: ${{ needs.pre_build.outputs.out1 }}

Mac_ARM_Bld:
needs: pre_build
uses: ./.github/workflows/ci_macos_ARM.yml
with:
verSion: ${{ needs.pre_build.outputs.out1 }}

Ubu_ARM_Bld:
needs: pre_build
uses: ./.github/workflows/bld_java_ubu_arm.yml
with:
verSion: ${{ needs.pre_build.outputs.out1 }}

Windows_Bld:
needs: pre_build
uses: ./.github/workflows/ci_windows.yml
Expand All @@ -53,7 +62,7 @@ jobs:
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}

Build_and_upload:
needs: [pre_build, Mac_i86_Bld, Windows_Bld]
needs: [pre_build, Mac_i86_Bld, Windows_Bld, Ubu_ARM_Bld]
runs-on: ubu4mvn
env:
VERSION_FILE: speedb/version.h
Expand All @@ -76,11 +85,15 @@ jobs:
run: |
export JAVA_HOME="$(jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));')"
export LIB_JAVA_VERSION=11.0.17
export the_version=${{steps.find_version.outputs.verSion}}
export the_version=${{ steps.find_version.outputs.verSion }}
make DEBUG_LEVEL=0 -j 16 rocksdbjava
cd java
mkdir src/main/resources
aws s3 --profile nd7 cp --recursive s3://spdb-builder/jar_test/v$VERSION/ java/src/main/resources/
ls -l java/src/main/resources/
cp target/libspeedbjni-linux64.so src/main/resources
echo "aws s3 --profile nd7 cp --recursive s3://spdb-builder/jar_test/v$VERSION/ java/src/main/resources/"
sleep 180
aws s3 --profile nd7 cp --recursive s3://spdb-builder/jar_test/v$VERSION/ src/main/resources/
ls -l src/main/resources/
cp ../../../../../templ/pom.xml .
mvn versions:set -DnewVersion=$VERSION-SNAPSHOT
mvn deploy -X -e -DskipTests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
export JAVA_HOME=/usr/local/opt/openjdk@11
export CPPFLAGS="-I/usr/local/opt/openjdk@11/include"
export CXXFLAGS="-I/usr/local/opt/openjdk@11/include"
DEBUG_LEVEL=0 make -j 4 rocksdbjavastatic
ROCKSDB_DISABLE_JEMALLOC=1 PORTABLE=1 DEBUG_LEVEL=0 make -j 4 rocksdbjavastatic
- name: 'upload artifacts' #This step executed only when this workflow is called by another and a version is provided
if: inputs.verSion != ' '
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci_macos_ARM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build Speedb on a Mac OS server
#
# This workflow assumes the self hosted runner on a Mac machine is ready.
# The Mac OS server must have all the tools and software required for Speedb building to be installed


name: ARM - Build on Mac

on:
workflow_call:
inputs:
verSion:
required: true
type: string
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest # will be changed to a MAC when it will be available
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3

- name: 'build'
run: |
echo "the built library java/target/libspeedbjni-osx-x86_64.jnilib needs to be uploaded to the folloing location"
echo "java/target/libspeedbjni-osx-arm64.jnilib s3://spdb-builder/jar_test/v${{ inputs.verSion }}/libspeedbjni-osx-arm64.jnilib"
# export JAVA_HOME=/usr/local/opt/openjdk@11
# export CPPFLAGS="-I/usr/local/opt/openjdk@11/include"
# export CXXFLAGS="-I/usr/local/opt/openjdk@11/include"
# ROCKSDB_DISABLE_JEMALLOC=1 PORTABLE=1 DEBUG_LEVEL=0 make -j 4 rocksdbjavastatic
- name: 'upload artifacts' #This step executed only when this workflow is called by another and a version is provided
if: inputs.verSion != ' '
run: echo "nothing to do here until the real environment is ready"
#run: aws s3 cp java/target/libspeedbjni-osx-x86_64.jnilib s3://spdb-builder/jar_test/v${{ inputs.verSion }}/libspeedbjni-osx-x86_64.jnilib

0 comments on commit 0e1971c

Please sign in to comment.