-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use MacOS-13 in CI #58465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Use MacOS-13 in CI #58465
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
24113a0
Use MacOS-13 in CI
wtgodbe 1bc73f3
Gradle 6.9
wtgodbe a4a6928
Update gradle-wrapper.properties
wtgodbe 4c2f2ac
Update gradle-wrapper.properties
wtgodbe be359bd
Update build.gradle
wtgodbe 0b8ef84
Update build.gradle
wtgodbe 436a2f0
Update build.gradle
wtgodbe 202ff4c
Update build.gradle
wtgodbe 9500b79
Update build.gradle
wtgodbe 271401b
Update build.gradle
wtgodbe 5118187
Update build.gradle
wtgodbe 0125762
Fixup gradle
BrennanConroy 87a93ef
Apply suggestions from code review
BrennanConroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,9 +116,9 @@ public Single<HttpResponse> send(HttpRequest httpRequest, ByteBuffer bodyContent | |
| case "POST": | ||
| RequestBody body; | ||
| if (bodyContent != null) { | ||
| body = RequestBody.create(MediaType.parse("text/plain"), ByteString.of(bodyContent)); | ||
| body = RequestBody.Companion.create(ByteString.of(bodyContent), MediaType.parse("text/plain")); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } else { | ||
| body = RequestBody.create(null, new byte[]{}); | ||
| body = RequestBody.Companion.create(new byte[]{}, null); | ||
| } | ||
|
|
||
| requestBuilder.post(body); | ||
|
|
||
4 changes: 2 additions & 2 deletions
4
src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionSha256Sum=23e7d37e9bb4f8dabb8a3ea7fdee9dd0428b9b1a71d298aefd65b11dccea220f | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip | ||
| distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
76 changes: 41 additions & 35 deletions
76
src/SignalR/clients/java/signalr/messagepack/build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,56 +1,62 @@ | ||
| plugins { | ||
| id 'java' | ||
| id 'maven' | ||
| id 'maven-publish' | ||
| } | ||
|
|
||
| group 'com.microsoft.signalr.messagepack' | ||
|
|
||
| java | ||
| { | ||
| withJavadocJar() | ||
| withSourcesJar() | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation project(':core') | ||
| compile 'org.msgpack:msgpack-core:0.8.20' | ||
| compile 'org.msgpack:jackson-dataformat-msgpack:0.8.20' | ||
| implementation 'org.msgpack:msgpack-core:0.8.20' | ||
| implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20' | ||
| } | ||
|
|
||
| archivesBaseName = 'signalr-messagepack' | ||
|
|
||
| task sourceJar(type: Jar) { | ||
| classifier "sources" | ||
| from sourceSets.main.allJava | ||
| base { | ||
| archivesName = 'signalr-messagepack' | ||
| } | ||
|
|
||
| task javadocJar(type: Jar, dependsOn: javadoc) { | ||
| classifier "javadoc" | ||
| from javadoc.destinationDir | ||
| } | ||
| publishing { | ||
| publications { | ||
| release(MavenPublication) { | ||
| from components.java | ||
|
|
||
| task generatePOM { | ||
| pom { | ||
| project { | ||
| artifactId 'signalr-messagepack' | ||
| inceptionYear '2020' | ||
| description 'MessagePack protocol implementation for ASP.NET Core SignalR Client for Java applications' | ||
| url 'https://github.com/dotnet/aspnetcore' | ||
| name groupId + ':' + artifactId | ||
| licenses { | ||
| license { | ||
| name 'MIT License' | ||
| url 'https://opensource.org/licenses/MIT' | ||
| distribution 'repo' | ||
|
|
||
| pom { | ||
| packaging = 'jar' | ||
| inceptionYear = '2020' | ||
| url = 'https://github.com/dotnet/aspnetcore' | ||
| name = groupId + ':' + artifactId | ||
| licenses { | ||
| license { | ||
| name = 'MIT License' | ||
| url = 'https://opensource.org/licenses/MIT' | ||
| distribution = 'repo' | ||
| } | ||
| } | ||
| } | ||
| scm { | ||
| connection 'scm:git:https://github.com/dotnet/aspnetcore.git' | ||
| developerConnection 'scm:git:https://github.com/dotnet/aspnetcore.git' | ||
| url 'https://github.com/dotnet/aspnetcore/tree/main' | ||
| } | ||
| developers { | ||
| developer { | ||
| id 'microsoft' | ||
| name 'Microsoft' | ||
| scm { | ||
| connection = 'scm:git:https://github.com/dotnet/aspnetcore.git' | ||
| developerConnection = 'scm:git:https://github.com/dotnet/aspnetcore.git' | ||
| url = 'https://github.com/dotnet/aspnetcore/tree/main' | ||
| } | ||
| developers { | ||
| developer { | ||
| id = 'microsoft' | ||
| name = 'Microsoft' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }.writeTo("${buildDir}/libs/signalr-messagepack-${project.version}.pom") | ||
| } | ||
| } | ||
|
|
||
| task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM]) | ||
| tasks.withType(GenerateMavenPom).all { | ||
| destination = layout.buildDirectory.file("libs/signalr-messagepack-${project.version}.pom").get().asFile | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,61 @@ | ||
| apply plugin: 'org.junit.platform.gradle.plugin' | ||
| plugins { | ||
| id 'java' | ||
| } | ||
|
|
||
| configurations { | ||
| antJUnit | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' | ||
| compile 'org.junit.jupiter:junit-jupiter-params:5.3.1' | ||
| runtime 'org.junit.jupiter:junit-jupiter-engine:5.3.1' | ||
| implementation 'org.junit.jupiter:junit-jupiter-params:5.11.2' | ||
| testImplementation 'org.junit.jupiter:junit-jupiter:5.11.2' | ||
| testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.2' | ||
| implementation 'com.google.code.gson:gson:2.8.5' | ||
| compile 'ch.qos.logback:logback-classic:1.2.3' | ||
| implementation 'ch.qos.logback:logback-classic:1.2.3' | ||
| implementation project(':core') | ||
| implementation project(':messagepack') | ||
| compile project(':messagepack') | ||
| implementation project(':messagepack') | ||
| antJUnit 'org.apache.ant:ant-junit:1.10.15' | ||
| } | ||
|
|
||
| sourceSets { | ||
| test { | ||
| java { | ||
| srcDir 'src' | ||
| } | ||
| } | ||
| } | ||
|
|
||
| test { | ||
| useJUnitPlatform() | ||
| testLogging { | ||
| events "passed", "skipped", "failed" | ||
| } | ||
|
|
||
| reports { | ||
| html.required = false | ||
| junitXml.outputPerTestCase = true | ||
| junitXml.required = true | ||
| } | ||
| } | ||
|
|
||
| // Merge test results into a single file for Helix to detect JUnit test file | ||
| task testReport { | ||
| ext { | ||
| resultsDir = file("$buildDir/test-results") | ||
| mergedFile = "test-results/junit-results.xml" | ||
| } | ||
|
|
||
| doLast { | ||
| mkdir 'test-results' | ||
| ant.taskdef(name: 'junitreport', | ||
| classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator', | ||
| classpath: configurations.antJUnit.asPath) | ||
|
|
||
| ant.junitreport(tofile: mergedFile) { | ||
| fileset(dir: resultsDir, includes: '**/TEST-*.xml') | ||
| } | ||
| } | ||
| } | ||
|
|
||
| junitPlatform { | ||
| reportsDir file('test-results') | ||
| } | ||
| test.finalizedBy(testReport) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wtgodbe this change broke the entire VMR now that images got updated to a newer version of the jdk. This already happened once in the past which is why we made this change: 4a3afe3
Can you please describe why the minor and patch versions were necessary to be added here?
cc @mmitche
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean local dev is broken if you use a non-specific version
#58457
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for sharing the details.
Arcade offers scripts to install native tools which support defining just a major version or even "latest": https://github.com/dotnet/aspnetcore/blob/main/eng/common/init-tools-native.ps1
Any reason why you can't use those? The problem with the hardcoded version is that it breaks whenever the CI images get updated. I.e. right now all aspnetcore builds should be broken. See dotnet/sdk#45822
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any reason why we can't - I'd actually prefer it. Do we just need to add a pre-step in CI that runs the script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to install the JDK manually ourselves w/ https://github.com/dotnet/aspnetcore/blob/main/eng/scripts/InstallJdk.ps1, but stopped with #54421. I was under the impression we had to use whatever was pre-installed on the build machine/in the VMR tool cache
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need to use what's preinstalled on the machine. The Arcade script doesn't help downloading assets, it just helps finding the locally installed tool and promote it to PATH.
Let's move that discussion to dotnet/source-build#4816