-
Notifications
You must be signed in to change notification settings - Fork 3
178 lines (169 loc) · 5.14 KB
/
ci.yaml
File metadata and controls
178 lines (169 loc) · 5.14 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: CI
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
JAVA_VERSION: 21
NODE_VERSION: 22
GO_VERSION: 1.24
RUST_VERSION: 1.83.0
jobs:
style_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{env.JAVA_VERSION}}
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: style_check_maven
- name: Check Format
run: ./mvnw editorconfig:check
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{env.JAVA_VERSION}}
- uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gradle
key: manual_build_cache_key
- name: Build And Test
run: ./mvnw install -e --ntp -B
- name: Test JPMS
run: ./mvnw clean verify -pl it/java8 -P it-jpms -e --ntp -B
- name: Test Maven 3.2.5 compatibility
working-directory: build-tool-plugins/maven-plugin/it
run: ./mvnw stype:gen -e -B
- name: Build and Test Gradle plugin
working-directory: build-tool-plugins/gradle-plugin
run: ./gradlew --no-daemon test publishToMavenLocal --stacktrace
- name: Download Gradle in Gradle Plugin IT
working-directory: build-tool-plugins/gradle-plugin/it
run: ./gradlew --no-daemon --version
# - name: Test Gradle plugin # Gradle 7 does not support JDK21
# working-directory: build-tool-plugins/gradle-plugin/it
# run: ./gradlew stypeGen test --stacktrace
- name: Javadoc
run: ./mvnw -P release javadoc:javadoc --ntp -B
- name: Upload generated sources
uses: actions/upload-artifact@v4
with:
name: generated-sources
path: |
./it/java8/target/generated-sources
./it/java17/target/generated-sources
if-no-files-found: error
retention-days: 3
- name: Upload jars
uses: actions/upload-artifact@v4
with:
name: jars
path: ~/.m2/repository/online/sharedtype
if-no-files-found: error
retention-days: 3
- name: Remove jars from cache
run: rm -rf ~/.m2/repository/online/sharedtype
jdk_compatibility_test:
needs: [build_and_test]
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- uses: actions/download-artifact@v4
with:
name: jars
path: ~/.m2/repository/online/sharedtype
# - name: Display downloaded artifact
# run: ls -lhR ~/.m2/repository/online/sharedtype
- uses: actions/cache/restore@v4
with:
path: |
~/.m2/repository
~/.gradle
key: manual_build_cache_key
- name: Test
run: ./mvnw verify -pl it/java8 -e --ntp -B
- name: Maven Plugin Test
working-directory: build-tool-plugins/maven-plugin/it
run: ./mvnw stype:gen -e -B
- name: Gradle Plugin Test
working-directory: build-tool-plugins/gradle-plugin/it
run: ./gradlew stypeGen test --stacktrace
client_test:
needs: [build_and_test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- uses: actions/download-artifact@v4
with:
name: generated-sources
path: ./it/
# - name: Display downloaded artifact
# run: ls -lhR ./it/
- name: Test Typescript
working-directory: client-test/typescript
run: |
npm i
npm run test
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{env.RUST_VERSION}}
- name: Test Rust
working-directory: client-test/rust
run: cargo test
- uses: actions/setup-go@v5
with:
cache-dependency-path: client-test/go/go.sum
go-version-file: client-test/go/go.mod
- name: Test Golang
working-directory: client-test/go
run: go get && go test ./...
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{env.JAVA_VERSION}}
- uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: build_maven
- uses: actions/download-artifact@v4
with:
name: jars
path: ~/.m2/repository/online/sharedtype
- name: E2E Test
run: |
misc/start-client-servers.sh &
./mvnw verify -Pe2e -e --ntp -B
# clean-artifact:
# needs: [ jdk_compatibility_test, client_test ]
# runs-on: ubuntu-latest
# if: always()
# steps:
# - uses: geekyeggo/delete-artifact@v5
# with:
# name: dist