-
Notifications
You must be signed in to change notification settings - Fork 27
334 lines (306 loc) · 11.8 KB
/
Copy pathci.yaml
File metadata and controls
334 lines (306 loc) · 11.8 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
name: Continuous Integration
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
go_sdk_version:
default: ''
type: string
typescript_sdk_version:
default: ''
type: string
java_sdk_version:
default: ''
type: string
php_sdk_version:
default: ''
type: string
python_sdk_version:
default: ''
type: string
dotnet_sdk_version:
default: ''
type: string
ruby_sdk_version:
default: ''
type: string
permissions:
contents: read
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# Build cli and harnesses and get the latest SDK versions
build-go:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest - like 8x slower. Excluded for now since we're just building.
runs-on: ${{ matrix.os }}
outputs:
go_latest: ${{ steps.latest_version.outputs.go_latest }}
typescript_latest: ${{ steps.latest_version.outputs.typescript_latest }}
java_latest: ${{ steps.latest_version.outputs.java_latest }}
php_latest: ${{ steps.latest_version.outputs.php_latest }}
python_latest: ${{ steps.latest_version.outputs.python_latest }}
csharp_latest: ${{ steps.latest_version.outputs.csharp_latest }}
ruby_latest: ${{ steps.latest_version.outputs.ruby_latest }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: '^1.21'
- run: go build -o temporal-features
- run: go test ./cmd
- run: go test ./...
working-directory: harness/go
- run: go build ./...
working-directory: features
- name: Get the latest release version
id: latest_version
env:
INPUT_GO_SDK_VERSION: ${{ github.event.inputs.go_sdk_version }}
INPUT_TS_SDK_VERSION: ${{ github.event.inputs.typescript_sdk_version }}
INPUT_JAVA_SDK_VERSION: ${{ github.event.inputs.java_sdk_version }}
INPUT_PHP_SDK_VERSION: ${{ github.event.inputs.php_sdk_version }}
INPUT_PYTHON_SDK_VERSION: ${{ github.event.inputs.python_sdk_version }}
INPUT_DOTNET_SDK_VERSION: ${{ github.event.inputs.dotnet_sdk_version }}
INPUT_RUBY_SDK_VERSION: ${{ github.event.inputs.ruby_sdk_version }}
run: |
go_latest="$INPUT_GO_SDK_VERSION"
if [ -z "$go_latest" ]; then
go_latest=$(./temporal-features latest-sdk-version --lang go)
echo "Derived latest Go SDK release version: $go_latest"
fi
echo "go_latest=$go_latest" >> $GITHUB_OUTPUT
typescript_latest="$INPUT_TS_SDK_VERSION"
if [ -z "$typescript_latest" ]; then
typescript_latest=$(./temporal-features latest-sdk-version --lang ts)
echo "Derived latest Typescript SDK release version: $typescript_latest"
fi
echo "typescript_latest=$typescript_latest" >> $GITHUB_OUTPUT
java_latest="$INPUT_JAVA_SDK_VERSION"
if [ -z "$java_latest" ]; then
java_latest=$(./temporal-features latest-sdk-version --lang java)
echo "Derived latest Java SDK release version: $java_latest"
fi
echo "java_latest=$java_latest" >> $GITHUB_OUTPUT
php_latest="$INPUT_PHP_SDK_VERSION"
if [ -z "$php_latest" ]; then
php_latest=$(./temporal-features latest-sdk-version --lang php)
echo "Derived latest PHP SDK release version: $php_latest"
fi
echo "php_latest=$php_latest" >> $GITHUB_OUTPUT
python_latest="$INPUT_PYTHON_SDK_VERSION"
if [ -z "$python_latest" ]; then
python_latest=$(./temporal-features latest-sdk-version --lang py)
echo "Derived latest Python SDK release version: $python_latest"
fi
echo "python_latest=$python_latest" >> $GITHUB_OUTPUT
csharp_latest="$INPUT_DOTNET_SDK_VERSION"
if [ -z "$csharp_latest" ]; then
csharp_latest=$(./temporal-features latest-sdk-version --lang cs)
echo "Derived latest Dotnet SDK release version: $csharp_latest"
fi
echo "csharp_latest=$csharp_latest" >> $GITHUB_OUTPUT
ruby_latest="$INPUT_RUBY_SDK_VERSION"
if [ -z "$ruby_latest" ]; then
ruby_latest=$(./temporal-features latest-sdk-version --lang rb)
echo "Derived latest Ruby SDK release version: $ruby_latest"
fi
echo "ruby_latest=$ruby_latest" >> $GITHUB_OUTPUT
build-ts:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest - like 8x slower. Excluded for now since we're just building.
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
- run: npm ci
- name: Update Temporal SDK to latest
run: >
npm update
@temporalio/activity @temporalio/client @temporalio/common
@temporalio/plugin @temporalio/proto @temporalio/worker @temporalio/workflow
- run: npm run build
- run: npm run lint
build-python:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest - like 8x slower. Excluded for now since we're just building.
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.10'
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
- run: uv tool install poethepoet
- name: Update Temporal SDK to latest
run: uv lock --upgrade-package temporalio
- run: uv sync
- run: poe lint
build-php:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup PHP 8.2
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: 8.2
tools: composer:v2
extensions: dom, sockets, grpc, curl, protobuf
build-java:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest - like 8x slower. Excluded for now since we're just building.
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: 'temurin'
java-version: '23'
- run: ./gradlew build
build-dotnet:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest] # windows-latest - like 8x slower. Excluded for now since we're just building.
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
- run: dotnet build
- run: dotnet test
build-ruby:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Print build information
run: 'echo head_ref: "$GITHUB_HEAD_REF", ref: "$GITHUB_REF", os: ${{ matrix.os }}'
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Ruby
uses: ruby/setup-ruby@ba696adf55506673e48342a66e30f1f53cadeae0 # v1
with:
ruby-version: '4.0'
- run: gem install rubocop
- run: rubocop
feature-tests-ts:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/typescript.yaml
with:
version: ${{ needs.build-go.outputs.typescript_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-go:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/go.yaml
with:
version: ${{ needs.build-go.outputs.go_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-python:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/python.yaml
with:
version: ${{ needs.build-go.outputs.python_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-php:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/php.yaml
with:
version: ${{ needs.build-go.outputs.php_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-java:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/java.yaml
with:
version: 'v${{ needs.build-go.outputs.java_latest }}'
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-dotnet:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/dotnet.yaml
with:
version: ${{ needs.build-go.outputs.csharp_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
feature-tests-ruby:
permissions:
contents: read
actions: read
needs: build-go
uses: ./.github/workflows/ruby.yaml
with:
version: ${{ needs.build-go.outputs.ruby_latest }}
version-is-repo-ref: false
features-repo-ref: ${{ github.head_ref }}
features-repo-path: ${{ github.event.pull_request.head.repo.full_name }}
build-docker-images:
needs: build-go
uses: ./.github/workflows/all-docker-images.yaml
secrets: inherit
with:
do-push: ${{ github.ref == 'refs/heads/main' }}
go-ver: 'v${{ needs.build-go.outputs.go_latest }}'
ts-ver: 'v${{ needs.build-go.outputs.typescript_latest }}'
java-ver: 'v${{ needs.build-go.outputs.java_latest }}'
php-ver: 'v${{ needs.build-go.outputs.php_latest }}'
py-ver: 'v${{ needs.build-go.outputs.python_latest }}'
cs-ver: 'v${{ needs.build-go.outputs.csharp_latest }}'
rb-ver: 'v${{ needs.build-go.outputs.ruby_latest }}'