This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
122 lines (107 loc) · 3.17 KB
/
kotlin-ci.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Kotlin CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
actions: read
contents: read
security-events: write
on:
workflow_dispatch:
pull_request:
paths:
- 'packages/kotlin/**'
- 'examples/kotlin/**'
- 'examples/java/**'
- '.github/workflows/kotlin-ci.yml'
- '.github/workflows/codeql.yml'
- 'templates/**'
push:
branches: [main]
paths:
- 'packages/kotlin/**'
- 'examples/kotlin/**'
- 'examples/java/**'
- '.github/workflows/kotlin-ci.yml'
- '.github/workflows/codeql.yml'
- 'templates/**'
defaults:
run:
working-directory: packages/kotlin
env:
GRADLE_OPTS: '-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false'
WORKING_DIRECTORY: packages/kotlin
jobs:
publish-local:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: gradle
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: wrapper
- run: ./gradlew publishMavenPublicationToMavenLocal
env:
SKIP_SIGN: true
codeql:
name: kotlin-ci-codeql
uses: ./.github/workflows/codeql.yml
with:
language: java-kotlin
working-directory: packages/kotlin
validate:
name: kotlin-ci-validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
tests:
name: kotlin-ci-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
java-version: [11, 21]
kotlin-version: [1.9.10]
kotlin-ir-enabled: [true]
kotlin-test-mode: ['REFLECT']
include:
- excludeJniTests: false
excludeWindowsTests: false
- os: windows-latest
excludeJniTests: true
excludeWindowsTests: true
- os: macos-latest
excludeJniTests: true
# kotlin-test-mode: [ 'REFLECT', 'KSP', 'KAPT' ]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: gradle
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: wrapper
- name: Run tests with Gradle
run: >
./gradlew build check
--stacktrace --scan
-P"excludeJniTests=${{ matrix.excludeJniTests }}"
-P"excludeWindowsTests=${{ matrix.excludeWindowsTests }}"
-P"kotlin.version=${{ matrix.kotlin-version }}"
-P"kotlin.ir.enabled=${{ matrix.kotlin-ir-enabled }}"
-P"javaToolchainTestVersion=${{ matrix.java-version }}"
-P"kotlinTestMode=${{ matrix.kotlin-test-mode }}"