-
Notifications
You must be signed in to change notification settings - Fork 207
64 lines (55 loc) · 1.58 KB
/
samples.yml
File metadata and controls
64 lines (55 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build Samples
on:
workflow_dispatch:
pull_request:
branches: [ main ]
paths:
- 'samples/**'
push:
branches: [ main ]
paths:
- 'samples/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel only when the run is NOT on `main` branch
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
JAVA_VERSION: 21
JAVA_DISTRIBUTION: temurin
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- kotlin-mcp-client
- kotlin-mcp-server
- simple-streamable-server
- weather-stdio-server
name: Build Sample (${{ matrix.sample }})
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
validate-wrappers: true
add-job-summary: 'always'
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: "Build Sample: ${{ matrix.sample }}"
working-directory: ./samples/${{ matrix.sample }}
run: ./gradlew build
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@v7
with:
name: reports-samples-${{ matrix.sample }}
path: |
**/build/reports/