-
Notifications
You must be signed in to change notification settings - Fork 218
231 lines (182 loc) · 7.45 KB
/
sdk-codegen-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
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
name: sdk-codegen-ci
on:
workflow_dispatch:
jobs:
build-aws-sdk-js-v3:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 14.x
uses: actions/setup-node@v4
with:
node-version: 14.x
- name: Increase Node Heap space
run: echo "NODE_OPTIONS=--max-old-space-size=16384" >> $GITHUB_ENV
- uses: actions/checkout@v4
- id: smithy-version
uses: ./.github/workflows/checkout-and-build-smithy
- name: Add smithyVersion env variable
run: echo "smithyVersion=${{ steps.smithy-version.outputs.smithy-version }}" >> $GITHUB_ENV
- name: Checkout smithy-typescript
uses: actions/checkout@v4
with:
repository: awslabs/smithy-typescript
path: smithy-typescript
- name: Build smithy-typescript
run: cd smithy-typescript && ./gradlew -PsmithyVersion=$smithyVersion clean build publishToMavenLocal
- name: Checkout aws-sdk-js-v3
uses: actions/checkout@v4
with:
repository: aws/aws-sdk-js-v3
path: aws-sdk-js-v3
- name: Build aws-sdk-js-v3
run: cd aws-sdk-js-v3/codegen && ./gradlew -PsmithyVersion=$smithyVersion clean build
- name: Test aws-sdk-js-v3
run: cd aws-sdk-js-v3 && yarn && yarn test:all
build-aws-sdk-go-v2:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'corretto'
- name: Set up Go 1.19
uses: actions/setup-go@v5
with:
go-version: 1.19
- uses: actions/checkout@v4
- id: smithy-version
uses: ./.github/workflows/checkout-and-build-smithy
- name: Add smithyVersion env variable
run: echo "smithyVersion=${{ steps.smithy-version.outputs.smithy-version }}" >> $GITHUB_ENV
- name: Checkout smithy-go
uses: actions/checkout@v4
with:
repository: aws/smithy-go
path: smithy-go
- name: Build smithy-go
run: cd smithy-go/codegen && ./gradlew -PsmithyVersion=$smithyVersion clean build publishToMavenLocal
- name: Checkout aws-sdk-go-v2
uses: actions/checkout@v4
with:
repository: aws/aws-sdk-go-v2
path: aws-sdk-go-v2
- name: Build aws-sdk-go-v2
run: |
cd aws-sdk-go-v2/codegen
./gradlew -PsmithyVersion=$smithyVersion clean build -Plog-tests
./gradlew clean
- name: Run aws-sdk-go-v2 protocol tests
# This is essentially the `ci-test` command in the Makefile
run: |
cd aws-sdk-go-v2 && make update-requires gen-repo-mod-replace \
update-module-metadata smithy-annotate-stable gen-config-asserts gen-internal-codegen \
copy-attributevalue-feature gen-mod-dropreplace-smithy-. min-go-version-. tidy-modules-. \
add-module-license-files gen-aws-ptrs format unit-race ci-test-generate-validate
build-aws-sdk-kotlin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: smithy-version
uses: ./.github/workflows/checkout-and-build-smithy
- name: Add smithyVersion env variable
run: echo "smithyVersion=${{ steps.smithy-version.outputs.smithy-version }}" >> $GITHUB_ENV
- name: Checkout smithy-kotlin
uses: actions/checkout@v4
with:
repository: awslabs/smithy-kotlin
path: smithy-kotlin
- name: Build smithy-kotlin
run: cd smithy-kotlin && ./gradlew -PsmithyVersion=$smithyVersion clean build publishToMavenLocal
- name: Checkout aws-sdk-kotlin
uses: actions/checkout@v4
with:
repository: awslabs/aws-sdk-kotlin
path: aws-sdk-kotlin
- name: Build aws-sdk-kotlin
run: cd aws-sdk-kotlin && ./gradlew -PsmithyVersion=$smithyVersion clean build
- name: Build aws-sdk-kotlin
run: cd aws-sdk-kotlin && ./gradlew -PsmithyVersion=$smithyVersion clean build publishToMavenLocal
- name: Run aws-sdk-kotlin protocol tests
run: cd aws-sdk-kotlin && ./gradlew -PsmithyVersion=$smithyVersion -p codegen/protocol-tests testAllProtocols
build-aws-sdk-swift:
runs-on: ubuntu-latest
steps:
- uses: swift-actions/setup-swift@v2
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'corretto'
- uses: actions/checkout@v4
- id: smithy-version
uses: ./.github/workflows/checkout-and-build-smithy
- name: Add smithyVersion env variable
run: echo "smithyVersion=${{ steps.smithy-version.outputs.smithy-version }}" >> $GITHUB_ENV
- name: Checkout aws-crt-swift
uses: actions/checkout@v4
with:
repository: awslabs/aws-crt-swift
path: Sources/SmithySwift/aws-crt-swift
- name: Checkout smithy-swift
uses: actions/checkout@v4
with:
repository: awslabs/smithy-swift
path: Sources/SmithySwift/smithy-swift
- name: Build smithy-swift
run: |
echo $smithyVersion && cd Sources/SmithySwift/smithy-swift
./gradlew -PsmithyVersion=$smithyVersion clean build publishToMavenLocal
- name: Checkout aws-sdk-swift
uses: actions/checkout@v4
with:
repository: awslabs/aws-sdk-swift
path: Sources/SmithySwift/aws-sdk-swift
- name: Set SMITHY_SWIFT_CI_DIR env variable
run: echo "SMITHY_SWIFT_CI_DIR=$GITHUB_WORKSPACE/Sources/SmithySwift/smithy-swift" >> $GITHUB_ENV
- name: Set AWS_SDK_SWIFT_CI_DIR env variable
run: echo "AWS_SDK_SWIFT_CI_DIR=$GITHUB_WORKSPACE/Sources/SmithySwift/aws-sdk-swift" >> $GITHUB_ENV
- name: Build aws-sdk-swift
run: cd Sources/SmithySwift/aws-sdk-swift && ./gradlew -PsmithyVersion=$smithyVersion clean build
- name: Generate Swift SDKs
run: cd Sources/SmithySwift/aws-sdk-swift && ./gradlew -PsmithyVersion=$smithyVersion -p codegen/sdk-codegen build
- name: Build codegen/protocol-test-codegen-local
run: cd Sources/SmithySwift/aws-sdk-swift && ./gradlew -PsmithyVersion=$smithyVersion -p codegen/protocol-test-codegen-local build
- name: Run local protocol tests
run: cd Sources/SmithySwift/aws-sdk-swift/codegen/protocol-test-codegen-local/build && swift test
build-smithy-rs:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.62.1
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'corretto'
- uses: actions/checkout@v4
- id: smithy-version
uses: ./.github/workflows/checkout-and-build-smithy
- name: Add smithyVersion env variable
run: echo "smithyVersion=${{ steps.smithy-version.outputs.smithy-version }}" >> $GITHUB_ENV
- name: Check out smithy-rs
uses: actions/checkout@v4
with:
repository: awslabs/smithy-rs
ref: main
path: smithy-rs
- name: Check out aws-sdk-rust
uses: actions/checkout@v4
with:
repository: awslabs/aws-sdk-rust
ref: main
path: aws-sdk-rust
- name: Install rustfmt
run: rustup component add rustfmt
- name: Build smithy-rs
run: |
cd smithy-rs
./gradlew :aws:sdk:assemble -PsmithyVersion=$smithyVersion
- name: Test smithy-rs
run: |
cd smithy-rs
./gradlew :aws:sdk:cargoTest -PsmithyVersion=$smithyVersion