-
Notifications
You must be signed in to change notification settings - Fork 251
132 lines (106 loc) · 3.36 KB
/
ci.yml
File metadata and controls
132 lines (106 loc) · 3.36 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
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.java }} ${{ matrix.os }}
strategy:
matrix:
java: [17, 21, 25]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v6
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'corretto'
cache: gradle
- name: Clean, build, test, and javadoc
run: ./gradlew clean build javadoc -PnoFormat -Plog-tests --stacktrace
- name: Allow long file names in git for windows
if: matrix.os == 'windows-latest'
run: git config --system core.longpaths true
- name: Integration tests
if: matrix.java == 17
run: ./gradlew integ -Plog-tests --stacktrace
- uses: actions/upload-artifact@v7
if: failure()
with:
name: java-${{ matrix.java }}-${{ matrix.os }}-test-report
path: '**/build/reports/tests'
cli-distributions:
runs-on: ubuntu-latest
name: Build CLI executables
steps:
- uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'corretto'
cache: gradle
- name: Build CLI distributions
run: ./gradlew :smithy-cli:checksumImages
build-docs:
runs-on: ubuntu-latest
name: Documentation Build
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.x
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: latest
cache: npm
cache-dependency-path: "docs/landing-page/package-lock.json"
- name: Install doc dependencies
run: cd docs && make install
- name: Build docs
run: cd docs && make html
- uses: actions/upload-artifact@v7
with:
name: built-docs
path: docs/build/html
build-api-models-aws:
runs-on: ubuntu-latest
name: Build AWS API Models
steps:
- name: Checkout Smithy
uses: actions/checkout@v6
with:
path: 'smithy'
- name: Checkout api-models-aws
uses: actions/checkout@v6
with:
repository: aws/api-models-aws
path: api-models-aws
- uses: gradle/actions/wrapper-validation@v6
- name: Setup JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'corretto'
cache: gradle
- name: Publish Smithy to Maven local
run: cd smithy && ./gradlew clean build pTML -PnoFormat
- name: Update Smithy version
run: |
SMITHY_VERSION=$(cat ./smithy/VERSION) \
&& sed -i "s/smithy = \"[^\"]*\"/smithy = \"$SMITHY_VERSION\"/g" ./api-models-aws/gradle/libs.versions.toml
- name: Check that the Smithy version was updated properly
run: |
SMITHY_VERSION=$(cat ./smithy/VERSION) \
&& grep "smithy = \"$SMITHY_VERSION\"" ./api-models-aws/gradle/libs.versions.toml
- name: Build AWS API Models
run: cd api-models-aws && ./gradlew clean build