Skip to content

Commit

Permalink
masesgroup#573 (comment): apply workaround and make executable CET co…
Browse files Browse the repository at this point in the history
…mpatible
  • Loading branch information
masesdevelopers committed Dec 18, 2024
1 parent ebef03b commit c31945e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,21 +356,14 @@ jobs:
distribution: ${{ matrix.jdk_vendor }}
java-version: ${{ matrix.jdk_version }}

- name: Execute tests on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'macos-13' }}
- if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' || (matrix.os == 'windows-latest' && matrix.framework != 'net462') }} # for windows see https://github.com/masesgroup/JNet/issues/573#issuecomment-2550033900
continue-on-error: true
run: java -cp ${{ github.workspace }}/bin/${{ matrix.framework }}/jars/jnet-test-1.0.0.0.jar org.mases.jnet.TestHelloWorld

- name: Execute tests on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' || (matrix.os == 'windows-latest' && matrix.framework != 'net462') }}
continue-on-error: ${{ matrix.os == 'macos-13' }}
run: |
dotnet ./bin/${{ matrix.framework }}/JNetTest.dll
dotnet ./bin/${{ matrix.framework }}/JNetByteBufferTest.dll
- name: WINDOWS ONLY - Execute tests on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'windows-latest' && matrix.framework == 'net462' }}
continue-on-error: ${{ matrix.os == 'windows-latest' && matrix.framework == 'net9.0' }}
- if: ${{ matrix.os == 'windows-latest' && matrix.framework == 'net462' }}
continue-on-error: true
run: |
.\bin\${{ matrix.framework }}\JNetTest.exe
.\bin\${{ matrix.framework }}\JNetByteBufferTest.exe
Expand Down Expand Up @@ -456,26 +449,23 @@ jobs:
distribution: ${{ matrix.jdk_vendor }}
java-version: ${{ matrix.jdk_version }}

- name: Execute PowerShell test on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os != 'windows-latest' }}
- if: ${{ matrix.os != 'windows-latest' }}
continue-on-error: true
shell: pwsh
run: |
Register-PSRepository -Name Local_Nuget_Feed -SourceLocation $env:GITHUB_WORKSPACE\bin -PublishLocation $env:GITHUB_WORKSPACE\bin -InstallationPolicy Trusted
Install-Module MASES.JNetPS -Repository Local_Nuget_Feed
${{ github.workspace }}/bin/JNetPSTest.ps1
- name: Execute PowerShell test on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'windows-latest' }}
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: pwsh
run: |
Register-PSRepository -Name Local_Nuget_Feed -SourceLocation $env:GITHUB_WORKSPACE\bin -PublishLocation $env:GITHUB_WORKSPACE\bin -InstallationPolicy Trusted
Install-Module MASES.JNetPS -Repository Local_Nuget_Feed
${{ github.workspace }}\bin\JNetPSTest.ps1
- name: Execute PowerShell 5.1 test on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'windows-latest' }}
- if: ${{ matrix.os == 'windows-latest' }}
continue-on-error: true
shell: powershell
run: |
Expand Down
6 changes: 3 additions & 3 deletions src/net/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<AssemblyOriginatorKeyFile>..\Common\JNet.snk</AssemblyOriginatorKeyFile>
<NoWarn>$(NoWarn);0618</NoWarn>
</PropertyGroup>
<!--<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
--><!--see https://learn.microsoft.com/en-us/dotnet/core/compatibility/interop/9.0/cet-support--><!--
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
<!--see https://learn.microsoft.com/en-us/dotnet/core/compatibility/interop/9.0/cet-support-->
<CETCompat>false</CETCompat>
</PropertyGroup>-->
</PropertyGroup>
<PropertyGroup Condition="'$(JNET_DOCKER_BUILD_ACTIONS)' != 'true'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net462;net8.0;net9.0</TargetFrameworks>
Expand Down

This file was deleted.

0 comments on commit c31945e

Please sign in to comment.