Skip to content

Commit de72417

Browse files
committed
Run PR validation on multiple OS
1 parent 41fc351 commit de72417

File tree

2 files changed

+48
-8
lines changed

2 files changed

+48
-8
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,26 @@ concurrency:
1313
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
jobs:
16-
validate-pr:
17-
runs-on: macos-latest-xlarge
18-
name: Validate PR
16+
build:
17+
runs-on: ${{ matrix.os }}
18+
name: ${{ matrix.name }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- os: macos-latest-xlarge
24+
name: "macOS"
25+
java-opts: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g -DexcludeDockerTests=true"
26+
gradle-task: "clean ktlintCheck assemble macosArm64Test macosX64Test jvmTest koverLog koverHtmlReport"
27+
test-type: "macos"
28+
- os: ubuntu-latest
29+
name: "Ubuntu"
30+
java-opts: "-Xmx4g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx3g"
31+
gradle-task: "clean :kotlin-sdk-test:jvmTest"
32+
test-type: "ubuntu"
33+
env:
34+
JAVA_OPTS: "${{ matrix.java-opts }}"
35+
TS_SDK_IMAGE: "registry.jetbrains.team/p/grazi/grazie-infra-public/typescript-sdk-mcp@sha256:585bd19d0f2c3e46250da4d128cf3f2e8c155dc387026927e319f556a4fd559f"
1936
steps:
2037
- uses: actions/checkout@v5
2138

@@ -26,21 +43,38 @@ jobs:
2643
distribution: 'temurin'
2744

2845
- name: Setup Gradle
29-
uses: gradle/actions/setup-gradle@v4
46+
uses: gradle/actions/setup-gradle@v5
3047
with:
3148
add-job-summary: 'always'
3249
cache-read-only: true
3350

3451
- name: Build with Gradle
35-
run: ./gradlew clean ktlintCheck build koverLog koverHtmlReport
36-
env:
37-
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
52+
run: ./gradlew ${{ matrix.gradle-task }}
53+
54+
- name: Publish to Maven Local (macOS only)
55+
if: matrix.test-type == 'macos'
56+
run: ./gradlew :kotlin-sdk-core:publishToMavenLocal :kotlin-sdk-client:publishToMavenLocal :kotlin-sdk-server:publishToMavenLocal
57+
58+
- name: Build Kotlin-MCP-Client Sample
59+
if: matrix.test-type == 'macos'
60+
working-directory: ./samples/kotlin-mcp-client
61+
run: ./../../gradlew clean build
62+
63+
- name: Build Kotlin-MCP-Server Sample
64+
if: matrix.test-type == 'macos'
65+
working-directory: ./samples/kotlin-mcp-server
66+
run: ./../../gradlew clean build
67+
68+
- name: Build Weather-Stdio-Server Sample
69+
if: matrix.test-type == 'macos'
70+
working-directory: ./samples/weather-stdio-server
71+
run: ./../../gradlew clean build
3872

3973
- name: Upload Reports
4074
if: ${{ !cancelled() }}
4175
uses: actions/upload-artifact@v4
4276
with:
43-
name: reports
77+
name: reports-${{ matrix.test-type }}
4478
path: |
4579
**/build/reports/
4680
@@ -54,6 +88,7 @@ jobs:
5488
include_empty_in_summary: false
5589
include_time_in_summary: true
5690
annotate_only: true
91+
check_name: Test Report (${{ matrix.test-type }})
5792

5893
- name: Disable Auto-Merge on Fail
5994
if: failure() && github.event_name == 'pull_request'

kotlin-sdk-test/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ kotlin {
66
jvm {
77
testRuns["test"].executionTask.configure {
88
useJUnitPlatform()
9+
if (System.getProperty("excludeDockerTests") == "true") {
10+
filter {
11+
excludeTestsMatching("*.typescript.*")
12+
}
13+
}
914
}
1015
}
1116
sourceSets {

0 commit comments

Comments
 (0)