diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 386c574125..c3d66c03ef 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -62,11 +62,6 @@ jobs: # The type of runner that the job will run on runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - framework: [ 'net6.0', 'net8.0' ] - # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -76,18 +71,63 @@ jobs: # Runs a set of commands using the runners shell - name: Build JCOReflectorCLI - run: dotnet build --no-incremental --framework ${{ matrix.framework }} --configuration Release src/net/JCOReflectorCLI.sln + run: dotnet build --no-incremental --framework net6.0 --configuration Release src/net/JCOReflectorCLI.sln + + - name: Build Java files + run: dotnet bin/net6.0/MASES.JCOReflectorCLI.dll -JobType Build -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/build_linux.job + + - name: Build JAR files + run: dotnet bin/net6.0/MASES.JCOReflectorCLI.dll -JobType CreateJars -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/createjars_net6.0_linux.job + + - name: Build JCOReflectorCLI + run: dotnet build --no-incremental --framework net8.0 --configuration Release src/net/JCOReflectorCLI.sln - name: Build Java files - run: dotnet bin/${{ matrix.framework }}/MASES.JCOReflectorCLI.dll -JobType Build -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/build_linux.job + run: dotnet bin/net8.0/MASES.JCOReflectorCLI.dll -JobType Build -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/build_linux.job - name: Build JAR files - run: dotnet bin/${{ matrix.framework }}/MASES.JCOReflectorCLI.dll -JobType CreateJars -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/createjars_${{ matrix.framework }}_linux.job + run: dotnet bin/net8.0/MASES.JCOReflectorCLI.dll -JobType CreateJars -JDKFolder $JAVA_HOME_11_X64 -JobFile .github/workflows/createjars_net8.0_linux.job - - uses: actions/setup-java@v4 + - name: Save JCOReflector bin in cache + uses: actions/cache/save@v4 with: - distribution: 'temurin' - java-version: '17' + enableCrossOsArchive: true + path: ./bin/ + key: JCOReflector_linux_bin_${{ github.run_id }}_${{ github.run_attempt }} + + + execute_java_tests: + needs: build_linux + strategy: + fail-fast: false + matrix: + framework: [ 'net6.0', 'net8.0' ] + jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] + jdk_version: [ '11', '17', '21' ] # only LTS versions + exclude: + - jdk_vendor: oracle + jdk_version: 11 + + runs-on: ubuntu-latest + 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.run_id }}_${{ github.run_attempt }} + + - 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: Prepare extra argument @@ -142,6 +182,28 @@ 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 + execute_scala_tests: + needs: build_linux + strategy: + fail-fast: false + matrix: + framework: [ 'net6.0', 'net8.0' ] + + runs-on: ubuntu-latest + 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.run_id }}_${{ github.run_attempt }} + - name: Download and install Scala package run: | sudo apt update diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 7784ee80a6..d099aeedcc 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -126,173 +126,126 @@ jobs: run: .\bin\net462\MASES.JCOReflectorCLI -JobType CreateJars -JobFile .github\workflows\createjars_net462_win19.job -JDKFolder %JAVA_HOME_11_X64% shell: cmd - - uses: actions/setup-java@v4 + - name: Save JCOReflector source in cache + uses: actions/cache/save@v4 with: - distribution: 'temurin' - java-version: '17' + enableCrossOsArchive: true + path: ./src/jvm/ + key: JCOReflector_source_${{ github.run_id }}_${{ github.run_attempt }} + + - name: Save JCOReflector bin in cache + uses: actions/cache/save@v4 + with: + enableCrossOsArchive: true + path: ./bin/ + key: JCOReflector_windows_bin_${{ github.run_id }}_${{ github.run_attempt }} + + execute_java_tests: + needs: build_windows + strategy: + fail-fast: false + matrix: + framework: [ 'net462', 'net6.0', 'net8.0' ] + jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle'] + jdk_version: [ '11', '17', '21' ] # only LTS versions + exclude: + - jdk_vendor: oracle + jdk_version: 11 + + runs-on: windows-latest + steps: + + - name: Restore JCOReflector bin from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./bin/ + key: JCOReflector_windows_bin_${{ github.run_id }}_${{ github.run_attempt }} + + - 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: Build Java test source file .NET Core 6.0 - run: javac -cp ./bin/net6.0/JCOReflector.jar ./tests/jvm/java/src/hierarchy/*.java ./tests/jvm/java/src/mscorlib/*.java ./tests/jvm/java/src/nettest/*.java ./tests/jvm/java/src/refout/*.java + - name: Build Java test source file for ${{ matrix.framework }} + run: javac -cp ./bin/${{ matrix.framework }}/JCOReflector.jar ./tests/jvm/java/src/hierarchy/*.java ./tests/jvm/java/src/mscorlib/*.java ./tests/jvm/java/src/nettest/*.java ./tests/jvm/java/src/refout/*.java + + - name: Prepare extra argument + if: matrix.framework == 'net6.0' + shell: bash + run: echo "EXTRA_ARGUMENT=--CoreCLRApp:Microsoft.NET6.App" >> $GITHUB_ENV - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloLock --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloLock ${{ env.EXTRA_ARGUMENT }} continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNET --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNET --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNETEvent --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNETEvent --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloIterator --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloIterator --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloHierarchy --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloHierarchy --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloInterfaces --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloInterfaces --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket -async --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket -async --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOutBase --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOutBase --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net6.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOut --CoreCLRApp:Microsoft.NET6.App + - run: java -cp "./bin/${{ matrix.framework }}/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOut --CoreCLRApp:Microsoft.NET6.App continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - name: Build Java test source file .NET Core 8.0 - run: javac -cp ./bin/net8.0/JCOReflector.jar ./tests/jvm/java/src/hierarchy/*.java ./tests/jvm/java/src/mscorlib/*.java ./tests/jvm/java/src/nettest/*.java ./tests/jvm/java/src/refout/*.java + execute_scala_tests: + needs: build_windows + strategy: + fail-fast: false + matrix: + framework: [ 'net462', 'net6.0', 'net8.0' ] - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloLock - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNET - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNETEvent - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloIterator - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloHierarchy - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloInterfaces - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket -async - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOutBase - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net8.0/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOut - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - - name: Build Java test source file .NET Framework - run: javac -cp ./bin/net462/JCOReflector.jar ./tests/jvm/java/src/hierarchy/*.java ./tests/jvm/java/src/mscorlib/*.java ./tests/jvm/java/src/nettest/*.java ./tests/jvm/java/src/refout/*.java + runs-on: windows-latest + steps: - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloLock - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNET - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloNETEvent - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" mscorlib.HelloIterator - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloHierarchy - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" hierarchy.HelloInterfaces - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" nettest.HelloNETSocket -async - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOutBase - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: java -cp "./bin/net462/JCOReflector.jar;./tests/jvm/java/src/" refout.HelloRefOut - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} + - name: Restore JCOReflector bin from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./bin/ + key: JCOReflector_windows_bin_${{ github.run_id }}_${{ github.run_attempt }} - name: Download Scala package run: C:\msys64\usr\bin\wget.exe https://downloads.lightbend.com/scala/2.13.5/scala-2.13.5.zip @@ -300,68 +253,68 @@ jobs: - name: Expand Scala package run: Expand-Archive -LiteralPath '.\scala-2.13.5.zip' -DestinationPath .\ -Force - - name: Build Scala test source file .NET Core 6.0 + - name: Build Scala test source file for ${{ matrix.framework }} shell: cmd run: | cd ./tests/jvm/scala mkdir output - ..\..\..\scala-2.13.5\bin\scalac -toolcp "../../../bin/net6.0/*" -d ./output ./src/main/scala/hierarchy/* ./src/main/scala/mscorlib/* ./src/main/scala/nettest/* ./src/main/scala/refout/* + ..\..\..\scala-2.13.5\bin\scalac -toolcp "../../../bin/${{ matrix.framework }}/*" -d ./output ./src/main/scala/hierarchy/* ./src/main/scala/mscorlib/* ./src/main/scala/nettest/* ./src/main/scala/refout/* - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" mscorlib.HelloLock --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" mscorlib.HelloLock --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" mscorlib.HelloNet --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" mscorlib.HelloNet --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" mscorlib.HelloNETEvent --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" mscorlib.HelloNETEvent --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" mscorlib.HelloIterator --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" mscorlib.HelloIterator --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" hierarchy.HelloHierarchy --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" hierarchy.HelloHierarchy --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" hierarchy.HelloInterfaces --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" hierarchy.HelloInterfaces --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" nettest.HelloNETSocket --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" nettest.HelloNETSocket --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" nettest.HelloNETSocket -async --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" nettest.HelloNETSocket -async --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" refout.HelloRefOutBase --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" refout.HelloRefOutBase --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net6.0/*;./tests/jvm/scala/output" refout.HelloRefOut --CoreCLRApp:Microsoft.NET6.App + - run: .\scala-2.13.5\bin\scala -toolcp "./bin/${{ matrix.framework }}/*;./tests/jvm/scala/output" refout.HelloRefOut --CoreCLRApp:Microsoft.NET6.App shell: cmd continue-on-error: true env: @@ -371,147 +324,27 @@ jobs: shell: cmd continue-on-error: true - - name: Build Scala test source file .NET Core 8.0 - shell: cmd - run: | - cd ./tests/jvm/scala - mkdir output - ..\..\..\scala-2.13.5\bin\scalac -toolcp "../../../bin/net8.0/*" -d ./output ./src/main/scala/hierarchy/* ./src/main/scala/mscorlib/* ./src/main/scala/nettest/* ./src/main/scala/refout/* - - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" mscorlib.HelloLock - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" mscorlib.HelloNet - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" mscorlib.HelloNETEvent - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" mscorlib.HelloIterator - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" hierarchy.HelloHierarchy - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" hierarchy.HelloInterfaces - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" nettest.HelloNETSocket - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" nettest.HelloNETSocket -async - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" refout.HelloRefOutBase - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net8.0/*;./tests/jvm/scala/output" refout.HelloRefOut - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: cd ./tests/jvm/scala && rmdir output /s /q - shell: cmd - continue-on-error: true + execute_finalize: + needs: [execute_java_tests, execute_scala_tests] - - name: Build Scala test source file .NET Framework - shell: cmd - run: | - cd ./tests/jvm/scala - mkdir output - ..\..\..\scala-2.13.5\bin\scalac -toolcp "../../../bin/net462/*" -d ./output ./src/main/scala/hierarchy/*.scala ./src/main/scala/mscorlib/* ./src/main/scala/nettest/* ./src/main/scala/refout/* - - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" mscorlib.HelloLock - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" mscorlib.HelloNet - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" mscorlib.HelloNETEvent - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" mscorlib.HelloIterator - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" hierarchy.HelloHierarchy - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" hierarchy.HelloInterfaces - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" nettest.HelloNETSocket - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" nettest.HelloNETSocket -async - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" refout.HelloRefOutBase - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: .\scala-2.13.5\bin\scala -toolcp "./bin/net462/*;./tests/jvm/scala/output" refout.HelloRefOut - shell: cmd - continue-on-error: true - env: - JCOBRIDGE_SCOPEDON: JCOReflector|1.0.0 - JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }} - - run: cd ./tests/jvm/scala && rmdir output /s /q - shell: cmd - continue-on-error: true + runs-on: windows-latest + steps: + + - name: Restore JCOReflector bin from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./bin/ + key: JCOReflector_windows_bin_${{ github.run_id }}_${{ github.run_attempt }} + + - name: Restore JCOReflector source from cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + enableCrossOsArchive: true + path: ./src/jvm/ + key: JCOReflector_source_${{ github.run_id }}_${{ github.run_attempt }} - name: Compress release files run: |