Skip to content

Commit

Permalink
Merge branch 'release/1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 8, 2022
2 parents d07a28a + f24cf00 commit b740df4
Show file tree
Hide file tree
Showing 15 changed files with 266 additions and 705 deletions.
52 changes: 39 additions & 13 deletions .github/workflows/IKVM.Maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
matrix:
sys:
- windows
- linux
tfm:
- net48
- netcoreapp3.1
Expand All @@ -122,9 +123,36 @@ jobs:
- build
runs-on: ${{ fromJSON('{"windows":["windows-2022"],"linux":["ubuntu-22.04"]}')[matrix.sys] }}
steps:
- name: Setup .NET
- name: Set Paths (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$dir="C:\run"
mkdir $dir
mkdir $dir\temp
mkdir $dir\dotnet
mkdir $dir\nuget
mkdir $dir\nuget\packages
mkdir $dir\job
Add-Content $env:GITHUB_ENV "`nJOBPATH=$dir\job"
Add-Content $env:GITHUB_ENV "`nTMP=$dir\temp`nTEMP=$dir\temp`nTMPDIR=$dir\temp"
Add-Content $env:GITHUB_ENV "`nDOTNET_INSTALL_DIR=$dir\dotnet"
Add-Content $env:GITHUB_ENV "`nNUGET_PACKAGES=$dir\nuget\packages"
- name: Set Paths (Linux)
if: runner.os == 'Linux'
shell: pwsh
run: Add-Content $env:GITHUB_ENV "`nDOTNET_INSTALL_DIR=${{ runner.temp }}/dotnet"
run: |
$dir="${{ runner.temp }}/run"
mkdir $dir
mkdir $dir/temp
mkdir $dir/dotnet
mkdir $dir/nuget
mkdir $dir/nuget/packages
mkdir $dir/job
Add-Content $env:GITHUB_ENV "`nJOBPATH=$dir/job"
Add-Content $env:GITHUB_ENV "`nTMP=$dir/temp`nTEMP=$dir/temp`nTMPDIR=$dir/temp"
Add-Content $env:GITHUB_ENV "`nDOTNET_INSTALL_DIR=$dir/dotnet"
Add-Content $env:GITHUB_ENV "`nNUGET_PACKAGES=$dir/nuget/packages"
- name: Setup .NET 3.1
uses: actions/setup-dotnet@v3
with:
Expand All @@ -137,9 +165,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup NuGet
shell: pwsh
run: Add-Content $env:GITHUB_ENV "`nNUGET_PACKAGES=${{ runner.temp }}\nuget\packages"
- name: Add NuGet Source (GitHub)
shell: pwsh
run: dotnet nuget add source --username USERNAME --password $env:GITHUB_TOKEN --store-password-in-clear-text --name ikvm $env:GITHUB_REPOS
Expand All @@ -150,30 +175,31 @@ jobs:
uses: actions/download-artifact@v3
with:
name: tests
path: dist
path: ${{ env.JOBPATH }}
- name: Restore Tests
run: tar xzvf tests.tar.gz
working-directory: dist
working-directory: ${{ env.JOBPATH }}
- name: Execute Tests
timeout-minutes: 120
timeout-minutes: 480
shell: pwsh
run: |
$tfm = "${{ matrix.tfm }}"
$sys = "${{ matrix.sys }}"
$tests = $(gci .\dist\tests\*\$tfm -Recurse -Filter '*.Tests.dll')
$tests = $(gci ./tests/*/$tfm -Recurse -Filter '*.Tests.dll')
if ($tests) {
Add-Content $env:GITHUB_ENV "`nRET=TestResults--$tfm--$sys"
dotnet test -f $tfm --blame -v 2 --results-directory "TestResults" --logger:"console;verbosity=detailed" --logger:trx --collect "Code Coverage" $tests
}
working-directory: ${{ env.JOBPATH }}
- name: Upload Test Results
if: always() && startsWith(env.RET, 'TestResults--')
uses: actions/upload-artifact@v3
with:
name: ${{ env.RET }}
path: TestResults
path: ${{ env.JOBPATH }}/TestResults
release:
name: Release
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
needs:
- test
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -201,7 +227,7 @@ jobs:
name: nuget
path: dist/nuget
- name: Create Release
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event.head_commit.message == '+prerelease'
if: github.ref == 'refs/heads/main' || github.event.head_commit.message == '+release'
uses: ncipollo/[email protected]
with:
tag: ${{ steps.GitVersion.outputs.semVer }}
Expand All @@ -225,7 +251,7 @@ jobs:
AZUREDEVOPS_REPOS: https://pkgs.dev.azure.com/ikvm-revived/ikvm/_packaging/ikvm-ci/nuget/v3/index.json
AZUREDEVOPS_TOKEN: ${{ secrets.AZUREDEVOPS_PAT }}
- name: Push NuGet
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event.head_commit.message == '+prerelease'
if: github.ref == 'refs/heads/main' || github.event.head_commit.message == '+release'
shell: pwsh
run: dotnet nuget push dist/nuget/*.nupkg --source $env:NUGET_REPOS --api-key $env:NUGET_TOKEN --skip-duplicate
env:
Expand Down
507 changes: 0 additions & 507 deletions Directory.Build.targets

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.27">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeCoverage" Version="17.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Moq" Version="4.18.2" />
Expand Down
6 changes: 5 additions & 1 deletion src/IKVM.Maven.Sdk.Tasks/IKVM.Maven.Sdk.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IKVM" Version="8.3.1" />
<PackageReference Include="IKVM" Version="8.4.0" />
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.27">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Build" Version="16.9.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.9.0" PrivateAssets="All" />
<PackageReference Include="NuGet.Common" Version="6.2.1" />
Expand Down
43 changes: 8 additions & 35 deletions src/IKVM.Maven.Sdk.Tests/IKVM.Maven.Sdk.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Buildalyzer" Version="4.1.4" />
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.27">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeCoverage" Version="17.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Moq" Version="4.18.2" />
Expand All @@ -26,7 +30,9 @@
</ItemGroup>

<ItemGroup>
<PackageProjectReference Include="..\IKVM.Maven.Sdk\IKVM.Maven.Sdk.csproj" />
<PackageProjectReference Include="..\IKVM.Maven.Sdk\IKVM.Maven.Sdk.csproj">
<PackageTargetPath>nuget</PackageTargetPath>
</PackageProjectReference>
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand All @@ -51,38 +57,5 @@
$(GetCopyToOutputDirectoryItemsDependsOn);
</GetCopyToOutputDirectoryItemsDependsOn>
</PropertyGroup>

<Target Name="AssignPackageProjectConfiguration" Condition=" '@(PackageProjectReference)' != '' " Inputs="@(PackageProjectReference)" Outputs="dummy">
<PropertyGroup>
<OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform>
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies>
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>
<AssignProjectConfiguration ProjectReferences="@(PackageProjectReference)" CurrentProject="$(MSBuildProjectFullPath)" CurrentProjectConfiguration="$(Configuration)" CurrentProjectPlatform="$(Platform)" DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)" VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)" OutputType="$(OutputType)" ResolveConfigurationPlatformUsingMappings="false" SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)" AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)" OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration="$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)" ShouldUnsetParentConfigurationAndPlatform="$(ShouldUnsetParentConfigurationAndPlatform)">
<Output TaskParameter="AssignedProjects" ItemName="_PackageProjectReferenceWithConfiguration" />
<Output TaskParameter="UnassignedProjects" ItemName="_PackageProjectReferenceWithConfiguration" />
</AssignProjectConfiguration>
</Target>

<Target Name="GetProjectReferencePackageOutputPath" DependsOnTargets="AssignPackageProjectConfiguration" Inputs="@(_PackageProjectReferenceWithConfiguration)" Outputs="dummy">
<MSBuild Projects="@(_PackageProjectReferenceWithConfiguration)" Targets="_CleanPackageFiles;Pack;GetPackageOutputPath" BuildInParallel="$(BuildInParallel)" Properties="%(_PackageProjectReferenceWithConfiguration.SetConfiguration);%(_PackageProjectReferenceWithConfiguration.SetPlatform)" RemoveProperties="%(_PackageProjectReferenceWithConfiguration.GlobalPropertiesToRemove);TargetFramework" Condition=" '%(_PackageProjectReferenceWithConfiguration.Identity)' != '' ">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageOutputPath" />
</MSBuild>
<ItemGroup>
<_ResolvePackageProjectReferenceOutputItems Include="%(_ResolvedPackageOutputPath.Identity)\**\*.nupkg" Condition=" '%(_ResolvedPackageOutputPath.Identity)' != '' " />
<ContentWithTargetPath Include="@(_ResolvePackageProjectReferenceOutputItems)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>nuget\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
</Target>

<PropertyGroup>
<GetCopyToOutputDirectoryItemsDependsOn>
GetProjectReferencePackageOutputPath;
$(GetCopyToOutputDirectoryItemsDependsOn);
</GetCopyToOutputDirectoryItemsDependsOn>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;net48;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net461;net472;net48;netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit b740df4

Please sign in to comment.