From b62f401f6b31550dee065d9df3555ba101918700 Mon Sep 17 00:00:00 2001
From: MASES Public Developers Team
<94312179+masesdevelopers@users.noreply.github.com>
Date: Sat, 22 Jun 2024 18:19:20 +0200
Subject: [PATCH] Update to JCOBridge 2.5.17, update version and added tests on
MacOS (#181)
* Update to JCOBridge 2.5.17, update version and added tests on MacOS
* Package preparation update
* Added specific mac section
* Removed testbranch workflow
* Added error upload in tests
---
.github/workflows/maven.yaml | 2 +-
.github/workflows/reflect_test_commit.yaml | 161 +++++++++++++++++-
.github/workflows/release.yaml | 2 +-
...stbranch.yaml => testbranch.disabled_yaml} | 0
src/net/CLI/JCOReflectorCLI.csproj | 2 +-
src/net/CLI/JCOReflectorCLI.nuspec | 2 +-
src/net/GUI/JCOReflectorGUI.csproj | 2 +-
src/net/engine/Const.cs | 6 +
src/net/engine/JCOReflectorEngine.csproj | 4 +-
9 files changed, 170 insertions(+), 11 deletions(-)
rename .github/workflows/{testbranch.yaml => testbranch.disabled_yaml} (100%)
diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml
index 0653c968cd..75a3a7ad49 100644
--- a/.github/workflows/maven.yaml
+++ b/.github/workflows/maven.yaml
@@ -109,7 +109,7 @@ jobs:
- name: Install local file to be used within Javadoc section of generated POM
shell: bash
- run: mvn install:install-file --no-transfer-progress -Dfile=../../../bin/${{ matrix.framework }}/JCOBridge.jar -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.14 -Dpackaging=jar -f ./src/jvm/src/${{ matrix.framework }}.xml
+ run: mvn install:install-file --no-transfer-progress -Dfile=../../../bin/${{ matrix.framework }}/JCOBridge.jar -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.17 -Dpackaging=jar -f ./src/jvm/src/${{ matrix.framework }}.xml
- name: Publish ${{ matrix.framework }} to Apache Maven Central
shell: bash
diff --git a/.github/workflows/reflect_test_commit.yaml b/.github/workflows/reflect_test_commit.yaml
index 9799112c84..5b3054e6d6 100644
--- a/.github/workflows/reflect_test_commit.yaml
+++ b/.github/workflows/reflect_test_commit.yaml
@@ -6,12 +6,14 @@ name: CI_REFLECT_TEST_COMMIT
# events but only for the master branch
on:
push:
- branches: [ master ]
+ # only trigger on branches, not on tags
+ branches: '**'
# This workflow contains two jobs called "check" and "build_windows"
jobs:
# Verify if a build is needed
check:
+ if: ${{ github.repository_owner == 'masesgroup' || (github.repository_owner != 'masesgroup' && github.ref_name != 'master') }} #do not execute on master outside main repo
name: Check changed files
outputs:
run_job: ${{ steps.check_files.outputs.run_job }}
@@ -292,6 +294,12 @@ jobs:
JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Errors_java_tests_windows_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}
+ path: .\hs_err_*
+ retention-days: 1
+
execute_scala_tests_windows:
needs: build_windows
strategy:
@@ -408,19 +416,30 @@ jobs:
shell: cmd
continue-on-error: true
- execute_java_tests_linux:
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Errors_scala_tests_windows_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}
+ path: .\hs_err_*
+ retention-days: 1
+
+ execute_java_tests_unix:
needs: build_linux
strategy:
fail-fast: false
matrix:
+ os: [ 'ubuntu-latest', 'macos-latest', 'macos-13' ]
framework: [ 'net6.0', 'net8.0' ]
jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle']
jdk_version: [ '11', '17', '21' ] # only LTS versions
exclude:
+ - os: macos-latest
+ framework: net6.0
+ - os: macos-13
+ framework: net6.0
- jdk_vendor: oracle
jdk_version: 11
- runs-on: ubuntu-latest
+ runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
@@ -494,6 +513,12 @@ jobs:
#java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOutBase
#java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOut
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Errors_java_tests_${{ matrix.os }}_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}
+ path: .\hs_err_*
+ retention-days: 1
+
execute_scala_tests_linux:
needs: build_linux
strategy:
@@ -600,8 +625,136 @@ jobs:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
- run: rm -rf ./tests/jvm/scala/output
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Errors_java_tests_linux_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}
+ path: .\hs_err_*
+ retention-days: 1
+
+ execute_scala_tests_mac:
+ needs: build_linux
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ 'macos-latest', 'macos-13' ]
+ framework: [ 'net8.0' ]
+ jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle']
+ jdk_version: [ '11', '17', '21' ] # only LTS versions
+ exclude:
+ - os: macos-latest
+ framework: net6.0
+ - os: macos-13
+ framework: net6.0
+ - jdk_vendor: oracle
+ jdk_version: 11
+
+ runs-on: ${{ matrix.os }}
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: '1'
+
+ - name: Restore JCOReflector bin from cache
+ uses: actions/cache/restore@v4
+ with:
+ fail-on-cache-miss: true
+ enableCrossOsArchive: true
+ path: ./bin/
+ key: JCOReflector_linux_bin_${{ github.sha }}
+
+ - name: Set up JDK distribution
+ uses: actions/setup-java@v4
+ with: # running setup-java again overwrites the settings.xml
+ distribution: ${{ matrix.jdk_vendor }}
+ java-version: ${{ matrix.jdk_version }}
+ cache: 'maven'
+
+ - name: Download and install Scala package
+ run: brew install scala@2.13
+
+ - name: Export Scala root
+ if: matrix.os == 'macos-13'
+ run: |
+ echo "SCALA_BIN=/usr/local/opt/scala@2.13/bin" >> $GITHUB_ENV
+ shell: bash
+
+ - name: Export Scala root
+ if: matrix.os == 'macos-latest'
+ run: |
+ echo "SCALA_BIN=/opt/homebrew/opt/scala@2.13/bin" >> $GITHUB_ENV
+ shell: bash
+
+ - name: Prepare extra argument
+ if: matrix.framework == 'net6.0'
+ shell: bash
+ run: echo "EXTRA_ARGUMENT=--CoreCLRApp:Microsoft.NET6.App" >> $GITHUB_ENV
+
+ - name: Build Scala test source file
+ run: |
+ mkdir ./tests/jvm/scala/output
+ ${{ env.SCALA_BIN }}/scalac -cp "./bin/${{ matrix.framework }}/*" -d ./tests/jvm/scala/output ./tests/jvm/scala/src/main/scala/hierarchy/* ./tests/jvm/scala/src/main/scala/mscorlib/* ./tests/jvm/scala/src/main/scala/nettest/* ./tests/jvm/scala/src/main/scala/refout/*
+
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" mscorlib.HelloLock ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" mscorlib.HelloNet ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" mscorlib.HelloNETEvent ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" mscorlib.HelloIterator ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" hierarchy.HelloHierarchy ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" hierarchy.HelloInterfaces ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" nettest.HelloNETSocket ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" nettest.HelloNETSocket -async ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" refout.HelloRefOutBase ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: ${{ env.SCALA_BIN }}/scala -nobootcp -toolcp "./bin/${{ matrix.framework }}/*:./tests/jvm/scala/output" refout.HelloRefOut ${{ env.EXTRA_ARGUMENT }}
+ continue-on-error: true
+ env:
+ JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0
+ JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
+ - run: rm -rf ./tests/jvm/scala/output
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: Errors_scala_tests_${{ matrix.os }}_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}
+ path: .\hs_err_*
+ retention-days: 1
+
execute_finalize:
- needs: [execute_java_tests_windows, execute_scala_tests_windows, execute_java_tests_linux, execute_scala_tests_linux]
+ needs: [execute_java_tests_windows, execute_scala_tests_windows, execute_java_tests_unix, execute_scala_tests_linux, execute_scala_tests_mac]
runs-on: windows-latest
steps:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 5c9f57cbce..71176372bf 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -58,7 +58,7 @@ jobs:
- name: Install local file to be used within Javadoc section of generated POM
shell: bash
- run: mvn install:install-file --no-transfer-progress -Dfile=../../../bin/${{ matrix.framework }}/JCOBridge.jar -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.14 -Dpackaging=jar -f ./src/jvm/src/${{ matrix.framework }}.xml
+ run: mvn install:install-file --no-transfer-progress -Dfile=../../../bin/${{ matrix.framework }}/JCOBridge.jar -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.17 -Dpackaging=jar -f ./src/jvm/src/${{ matrix.framework }}.xml
- name: Publish ${{ matrix.framework }} to Apache Maven Central
shell: bash
diff --git a/.github/workflows/testbranch.yaml b/.github/workflows/testbranch.disabled_yaml
similarity index 100%
rename from .github/workflows/testbranch.yaml
rename to .github/workflows/testbranch.disabled_yaml
diff --git a/src/net/CLI/JCOReflectorCLI.csproj b/src/net/CLI/JCOReflectorCLI.csproj
index e2dabebe7f..92ecc39fd6 100644
--- a/src/net/CLI/JCOReflectorCLI.csproj
+++ b/src/net/CLI/JCOReflectorCLI.csproj
@@ -9,7 +9,7 @@
Copyright © MASES s.r.l. 2024
MASES s.r.l.
MASES s.r.l.
- 1.14.2.0
+ 1.14.3.0
MASES.JCOReflectorCLI
true
net462;net6.0;net8.0
diff --git a/src/net/CLI/JCOReflectorCLI.nuspec b/src/net/CLI/JCOReflectorCLI.nuspec
index 5bd0fd3d21..9fec9f2af8 100644
--- a/src/net/CLI/JCOReflectorCLI.nuspec
+++ b/src/net/CLI/JCOReflectorCLI.nuspec
@@ -2,7 +2,7 @@
MASES.JCOReflectorCLI
- 1.14.2
+ 1.14.3
JCOReflector CLI - CLI interface for JCOReflector Engine
MASES s.r.l.
MASES s.r.l.
diff --git a/src/net/GUI/JCOReflectorGUI.csproj b/src/net/GUI/JCOReflectorGUI.csproj
index 877dbfd7c2..1c2715cc2d 100644
--- a/src/net/GUI/JCOReflectorGUI.csproj
+++ b/src/net/GUI/JCOReflectorGUI.csproj
@@ -8,7 +8,7 @@
Copyright © MASES s.r.l. 2024
MASES s.r.l.
MASES s.r.l.
- 1.14.2.0
+ 1.14.3.0
JCOReflectorGUI
true
net462;net6.0-windows;net8.0-windows
diff --git a/src/net/engine/Const.cs b/src/net/engine/Const.cs
index 64a1e5ae2a..c44baace0a 100644
--- a/src/net/engine/Const.cs
+++ b/src/net/engine/Const.cs
@@ -180,6 +180,10 @@ public static string GetRelativePath(string filespec, string folder)
Path.Combine("linux-arm64", "libnethost.so"),
Path.Combine("linux-x64", "J2CBridgeHostActivator.so"),
Path.Combine("linux-x64", "libnethost.so"),
+ Path.Combine("osx-arm64", "J2CBridgeHostActivator.dylib"),
+ Path.Combine("osx-arm64", "libnethost.dylib"),
+ Path.Combine("osx-x64", "J2CBridgeHostActivator.dylib"),
+ Path.Combine("osx-x64", "libnethost.dylib"),
#if !NET8_0
Path.Combine("win-arm", "J2CBridgeHostActivator.dll"),
Path.Combine("win-arm", "nethost.dll"),
@@ -198,8 +202,10 @@ public static string GetRelativePath(string filespec, string folder)
"J2CBridge_Arm.so",
"J2CBridge_Arm64.dll",
"J2CBridge_Arm64.so",
+ "J2CBridge_Arm64.dylib",
"J2CBridge_x64.dll",
"J2CBridge_x64.so",
+ "J2CBridge_x64.dylib",
"J2CBridge_x86.dll",
"JCOBridge.docs.jar",
"JCOBridge.jar",
diff --git a/src/net/engine/JCOReflectorEngine.csproj b/src/net/engine/JCOReflectorEngine.csproj
index eb378478a5..4f9bdd2701 100644
--- a/src/net/engine/JCOReflectorEngine.csproj
+++ b/src/net/engine/JCOReflectorEngine.csproj
@@ -7,7 +7,7 @@
Copyright © MASES s.r.l. 2024
MASES s.r.l.
MASES s.r.l.
- 1.14.2.0
+ 1.14.3.0
MASES.JCOReflectorEngine
true
net462;net6.0;net8.0
@@ -115,7 +115,7 @@
-
+
All
None