Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 41 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.gradle_enterprise_cache_username }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.gradle_enterprise_cache_password }}
RELEASE_BUILD: "true"
CI: true

jobs:
build:
Expand All @@ -37,6 +38,11 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- uses: gradle/actions/setup-gradle@v4
- name: set-up-jdk
uses: actions/setup-java@v4
Expand All @@ -47,16 +53,43 @@ jobs:
- name: check-java
run: java --version

- name: build
# - name: dotnet-build
# run: |
# (cd Rewrite && dotnet restore Rewrite.sln --no-cache --force --force-evaluate)
# (cd Rewrite && dotnet publish Rewrite.sln --no-restore)

- name: DotNet Build & Test
run: |
./build.sh CIBuild

- name: Report .NET Test Results
if: always()
uses: dorny/test-reporter@v1
with:
name: Unit Tests
path: artifacts/test-results/*.trx
reporter: dotnet-trx




- name: java-build
run: |
./gradlew ${{ env.GRADLE_SWITCHES }} assemble
(cd Rewrite && dotnet restore Rewrite.sln --no-cache --force --force-evaluate)
(cd Rewrite && dotnet publish Rewrite.sln --no-restore)
- name: test

- name: Java Tests
run: |
(cd Rewrite && dotnet test Rewrite.sln --filter "Category!=KnownBug & Category!=Exploratory & Category!=Roslyn")
./gradlew ${{ env.GRADLE_SWITCHES }} test

- name: Report Java Test Results
if: always()
uses: dorny/test-reporter@v1
with:
name: Unit Tests
path: rewrite-csharp-remote-server/build/test-results/test/*.xml
reporter: java-junit


- name: publish-java-snapshots
if: github.event_name != 'pull_request'
run: ./gradlew ${{ env.GRADLE_SWITCHES }} snapshot publish -PforceSigning -x test
Expand All @@ -66,12 +99,6 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}

- name: publish-dotnet-snapshots
if: github.event_name != 'pull_request'
run: |
cd Rewrite
mkdir ~/localNugetFeed
dotnet pack --version-suffix rc.${{ github.run_number }} --output ~/localNuGetFeed Rewrite.sln
dotnet nuget push ~/localNuGetFeed/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{env.NUGET_API_KEY}}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}



52 changes: 36 additions & 16 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
},
"definitions": {
"Host": {
"type": "string",
Expand All @@ -38,11 +24,17 @@
"ExecutableTarget": {
"type": "string",
"enum": [
"CIBuild",
"CIRelease",
"Clean",
"Compile",
"DownloadTestFixtures",
"GradleAssemble",
"NugetPush",
"Pack",
"Restore"
"PublishServer",
"Restore",
"Test"
]
},
"Verbosity": {
Expand Down Expand Up @@ -113,5 +105,33 @@
}
}
},
"$ref": "#/definitions/NukeBuild"
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"NugetApiKey": {
"type": "string",
"description": "ApiKey for the specified source",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NugetFeed": {
"type": "string"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
2 changes: 1 addition & 1 deletion .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "build.schema.json",
"Solution": "Rewrite/Rewrite.Sources.sln"
"Solution": "Rewrite/Rewrite.sln"
}
8 changes: 5 additions & 3 deletions Rewrite/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
<PackageIcon>openrewrite.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<VersionPrefix>0.23.0</VersionPrefix>
<RewriteRemoteDir Condition="'$(RewriteRemoteDir)'==''">..\..\..\..\..\moderneinc\rewrite-remote\Rewrite.Remote</RewriteRemoteDir>
<RemotePrinter>True</RemotePrinter>
<RemotePrinter>False</RemotePrinter>
<DebugVisitor>False</DebugVisitor>
<SanitizeStackTrace>True</SanitizeStackTrace>
<EmbeddedServer>true</EmbeddedServer>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup>
<RewriteRemoteVersion>0.18.1</RewriteRemoteVersion>
<MicrosoftCodeAnalysisVersion>4.12.0</MicrosoftCodeAnalysisVersion>
</PropertyGroup>


<Import Project="Directory.Build.props.user" Condition="Exists('Directory.Build.props.user')"/>

<PropertyGroup>
Expand Down
7 changes: 4 additions & 3 deletions Rewrite/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
<None Include="$(SolutionDir)resources\$(PackageIcon)" Pack="true" PackagePath="" />
<None Include="$(MSBuildThisFileDirectory)resources\$(PackageIcon)" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="all"/>
Expand All @@ -9,9 +9,10 @@
<Using Include="JetBrains.Annotations" />
</ItemGroup>
<Target Name="EnsuringPackageIconPresence" BeforeTargets="Pack">
<Message Importance="high" Text="$(OutputPath)$(PackageIcon)"/>
<Copy
SourceFiles="$(SolutionDir)resources\$(PackageIcon)"
DestinationFiles="$(TargetDir)$(PackageIcon)"
SourceFiles="$(MSBuildThisFileDirectory)resources\$(PackageIcon)"
DestinationFiles="$(OutputPath)$(PackageIcon)"
SkipUnchangedFiles="true"/>
</Target>
</Project>
151 changes: 0 additions & 151 deletions Rewrite/Rewrite.Sources.sln

This file was deleted.

8 changes: 0 additions & 8 deletions Rewrite/Rewrite.Sources.v3.ncrunchsolution

This file was deleted.

Loading
Loading