Skip to content

Commit

Permalink
Merge pull request #482 from ikvmnet/net8
Browse files Browse the repository at this point in the history
Add .NET 8 outputs
  • Loading branch information
wasabii authored Mar 27, 2024
2 parents e661a72 + 12300e2 commit 56a3f6f
Show file tree
Hide file tree
Showing 302 changed files with 1,858 additions and 1,058 deletions.
238 changes: 123 additions & 115 deletions .github/workflows/IKVM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
- created

env:
NATIVE_SDK_VERSION: "20240202.1"
NATIVE_SDK_VERSION: "20240322.2"

jobs:
build-openjdk:
Expand Down Expand Up @@ -138,10 +138,6 @@ jobs:
path: work
fetch-depth: 0
submodules: recursive
- name: Setup .NET 3.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
Expand All @@ -150,6 +146,10 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v4
Expand Down Expand Up @@ -222,6 +222,8 @@ jobs:
msbuild /m /bl `
/p:Configuration="Release" `
/p:Platform="Any CPU" `
/p:PreReleaseLabel=${env:GitVersion_PreReleaseLabel} `
/p:PreReleaseNumber=${env:GitVersion_WeightedPreReleaseNumber} `
/p:Version=${env:GitVersion_FullSemVer} `
/p:AssemblyVersion=${env:GitVersion_AssemblySemVer} `
/p:InformationalVersion=${env:GitVersion_InformationalVersion} `
Expand All @@ -236,7 +238,6 @@ jobs:
/p:CreateHardLinksForCopyLocalIfPossible=true `
/p:CreateHardLinksForPublishFilesIfPossible=true `
/p:ContinuousIntegrationBuild=true `
/p:FastBuild=true `
IKVM.dist.msbuildproj
working-directory: ${{ env.WORKPATH }}\ikvm
- name: Upload MSBuild Log
Expand Down Expand Up @@ -430,114 +431,117 @@ jobs:
with:
name: doc
path: C:\doc.zip
test-vars:
name: Test Variables
needs:
- build-ikvm
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.test-vars.outputs.matrix }}
steps:
- id: test-vars
shell: pwsh
env:
FULL_TEST: ${{ inputs.full_test }}
run: |
$sys = @(
"win-x64",
"linux-x64",
"osx-x64"
)
$tfm = @(
"net472",
"net6.0",
"net8.0"
)
$run = @(
"IKVM.ByteCode.Tests",
"IKVM.Reflection.Tests",
"IKVM.Tests",
"IKVM.Java.Tests",
"IKVM.Tools.Exporter.Tests",
"IKVM.Tools.Importer.Tests",
"IKVM.Tools.Tests",
"IKVM.MSBuild.Tasks.Tests",
"IKVM.MSBuild.Tests",
"IKVM.NET.Sdk.Tests",
"IKVM.JTReg.TestAdapter.Tests")
foreach ($_ in (0..15)) {
$run += @("IKVM.OpenJDK.Tests?TestPartition=$_")
}
$exclude = @(
@{
"tfm" = "net472"
"sys" = "linux-x64"
},
@{
"tfm" = "net472"
"sys" = "osx-x64"
},
@{
"run" = "IKVM.MSBuild.Tests"
"tfm" = "net472"
},
@{
"run" = "IKVM.MSBuild.Tests"
"tfm" = "net6.0"
},
@{
"run" = "IKVM.MSBuild.Tests"
"tfm" = "net7.0"
},
@{
"run" = "IKVM.MSBuild.Tests"
"sys" = "linux-x64"
},
@{
"run" = "IKVM.MSBuild.Tests"
"sys" = "osx-x64"
},
@{
"run" = "IKVM.MSBuild.Tests"
"sys" = "osx-arm64"
},
@{
"run" = "IKVM.NET.Sdk.Tests"
"tfm" = "net472"
},
@{
"run" = "IKVM.NET.Sdk.Tests"
"tfm" = "net6.0"
},
@{
"run" = "IKVM.NET.Sdk.Tests"
"tfm" = "net7.0"
}
)
if ($env:FULL_TEST -ne "true") {
foreach ($_ in (0..15)) {
$exclude += @(@{
"run" = "IKVM.OpenJDK.Tests?TestPartition=$_"
"tfm" = "net8.0"
})
}
}
"matrix=" + (@{
sys = $sys
tfm = $tfm
run = $run
exclude = $exclude
} | ConvertTo-Json -Compress).Replace('"', "'") >> $env:GITHUB_OUTPUT
test:
needs:
- build-ikvm
- test-vars
strategy:
fail-fast: false
matrix:
run:
- IKVM.ByteCode.Tests
- IKVM.Reflection.Tests
- IKVM.Tests
- IKVM.Java.Tests
- IKVM.Tools.Exporter.Tests
- IKVM.Tools.Importer.Tests
- IKVM.Tools.Tests
- IKVM.JTReg.TestAdapter.Tests
- IKVM.OpenJDK.Tests?TestPartition=0
- IKVM.OpenJDK.Tests?TestPartition=1
- IKVM.OpenJDK.Tests?TestPartition=2
- IKVM.OpenJDK.Tests?TestPartition=3
- IKVM.OpenJDK.Tests?TestPartition=4
- IKVM.OpenJDK.Tests?TestPartition=5
- IKVM.OpenJDK.Tests?TestPartition=6
- IKVM.OpenJDK.Tests?TestPartition=7
- IKVM.OpenJDK.Tests?TestPartition=8
- IKVM.OpenJDK.Tests?TestPartition=9
- IKVM.OpenJDK.Tests?TestPartition=10
- IKVM.OpenJDK.Tests?TestPartition=11
- IKVM.OpenJDK.Tests?TestPartition=12
- IKVM.OpenJDK.Tests?TestPartition=13
- IKVM.OpenJDK.Tests?TestPartition=14
- IKVM.OpenJDK.Tests?TestPartition=15
tfm:
- net472
- net6.0
sys:
- win-x64
- linux-x64
- osx-x64
exclude:
- tfm: net472
sys: linux-x64
- tfm: net472
sys: osx-x64
include:
- run: IKVM.ByteCode.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.ByteCode.Tests
tfm: net7.0
sys: linux-x64
- run: IKVM.ByteCode.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.Reflection.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.Reflection.Tests
tfm: net7.0
sys: linux-x64
- run: IKVM.Reflection.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.MSBuild.Tasks.Tests
tfm: net472
sys: win-x64
- run: IKVM.MSBuild.Tasks.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.MSBuild.Tasks.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.MSBuild.Tests
tfm: net7.0
sys: win-x64
# - run: IKVM.MSBuild.Tests
# tfm: net7.0
# sys: linux-x64
# - run: IKVM.MSBuild.Tests
# tfm: net7.0
# sys: osx-x64
- run: IKVM.NET.Sdk.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.NET.Sdk.Tests
tfm: net7.0
sys: linux-x64
- run: IKVM.NET.Sdk.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.Tests
tfm: net7.0
sys: linux-x64
- run: IKVM.Tests
tfm: net7.0
sys: osx-x64
- run: IKVM.Tools.Tests
tfm: net7.0
sys: win-x64
- run: IKVM.Tools.Tests
tfm: net7.0
sys: linux-x64
- run: IKVM.Tools.Tests
tfm: net7.0
sys: osx-x64
matrix: ${{ fromJSON(needs.test-vars.outputs.matrix) }}
name: Test (${{ matrix.run }}:${{ matrix.tfm }}:${{ matrix.sys }})
needs:
- build-ikvm
timeout-minutes: 240
runs-on: ${{ fromJSON('{"win-x64":["windows-2022"],"linux-x64":["ubuntu-22.04"],"osx-x64":["macos-12"]}')[matrix.sys] }}
steps:
Expand Down Expand Up @@ -584,6 +588,10 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup WSL
if: runner.os == 'Windows'
uses: Vampire/setup-wsl@v3
Expand All @@ -598,9 +606,9 @@ jobs:
MATRIX_RUN: '${{ matrix.run }}'
with:
script: |
const run = process.env.MATRIX_RUN;
const tst = run.split('?')[0];
return tst;
const run = process.env.MATRIX_RUN;
const tst = run.split('?')[0];
return tst;
result-encoding: string
- name: Download Tests
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -687,10 +695,10 @@ jobs:
- name: Setup .NET
shell: pwsh
run: Add-Content $env:GITHUB_ENV "`nDOTNET_INSTALL_DIR=${{ runner.temp }}/dotnet"
- name: Setup .NET 7.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,12 @@ ModelManifest.xml
/dist/
/build/
/msbuild.binlog

# Rider
.idea/

# VS Code
.vscode/

# Mono
.mono/
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</PropertyGroup>

<ItemGroup>
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\javac-ref\javac-ref.msbuildproj" IsJavaCompiler="true" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\javac-ref\javac-ref.csproj" IsJavaCompiler="true" TargetFramework="net8.0" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\ikvmc\ikvmc.csproj" IsIkvmCompiler="true" />
<IkvmToolReference Include="$(MSBuildThisFileDirectory)src\ikvmstub\ikvmstub.csproj" IsIkvmExporter="true" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<RuntimeIdentifier Condition=" '$(RuntimeIdentifier)' == 'win7-x86' ">win-x86</RuntimeIdentifier>
<RuntimeIdentifier Condition=" '$(RuntimeIdentifier)' == 'win7-x64' ">win-x64</RuntimeIdentifier>
<Prefer32Bit Condition=" '$(RuntimeIdentifier)' == 'win-x86' ">true</Prefer32Bit>
<Prefer32Bit Condition=" '$(RuntimeIdentifier)' == 'win-x86' And $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">true</Prefer32Bit>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.88">
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.93">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -47,4 +47,4 @@
</PackageReference>
</ItemGroup>

</Project>
</Project>
8 changes: 8 additions & 0 deletions IKVM.deps.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
<PackageReference Include="System.Text.Json" Version="6.0.6" />
</ItemGroup>
</When>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.3" />
<PackageReference Include="System.Data.Odbc" Version="8.0.0" />
</ItemGroup>
</When>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion IKVM.refs.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
<ProjectReference Include="$(MSBuildThisFileDirectory)src\IKVM.Java\IKVM.Java.msbuildproj">
<ProjectReference Include="$(MSBuildThisFileDirectory)src\IKVM.Java\IKVM.Java.csproj">
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
Expand Down
Loading

0 comments on commit 56a3f6f

Please sign in to comment.