92
92
distribution : " temurin"
93
93
94
94
- name : Set up Gradle
95
- uses : gradle/actions/setup-gradle@v3
95
+ uses : gradle/actions/setup-gradle@v4
96
96
97
97
- name : Set up signing key
98
98
run : mkdir -p "$HOME/.gnupg" && echo -n "$KEY" | base64 -d > "$HOME/.gnupg/secring.gpg"
@@ -128,7 +128,7 @@ jobs:
128
128
fail-fast : false
129
129
matrix :
130
130
include :
131
- - runner : buildjet-2vcpu- ubuntu-1804
131
+ - runner : ubuntu-latest
132
132
os_family : linux
133
133
arch : amd64
134
134
- runner : macos-13
@@ -138,43 +138,45 @@ jobs:
138
138
os_family : windows
139
139
arch : amd64
140
140
runs-on : ${{ matrix.runner }}
141
- env :
142
- # This is required to allow continuing usage of Node 16 for actions,
143
- # as Node 20 won't run on the builder we use for linux builds
144
- # (Node 20 require glibc 2.28+, but ubuntu-1804 has glibc 2.27).
145
- # https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/
146
- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
147
141
steps :
148
142
- name : Checkout repo
149
- # FIXME: v4+ requires Node 20
150
- uses : actions/checkout@v3
143
+ uses : actions/checkout@v4
151
144
with :
145
+ submodules : recursive
152
146
ref : ${{ env.INPUT_REF }}
153
147
154
148
# See comment on temporary tag above. tldr: this is a local tag; never
155
149
# gets pushed
156
150
- name : Temporary tag
157
151
run : git tag "$INPUT_TAG"
158
-
152
+
159
153
- name : Set up Java
160
- # FIXME: v4+ requires Node 20
161
- uses : actions/setup-java@v3
154
+ if : matrix.os_family != 'Linux'
155
+ uses : actions/setup-java@v4
162
156
with :
163
157
java-version : " 11"
164
158
distribution : " temurin"
165
159
166
160
- name : Set up Gradle
167
- # FIXME: v3+ requires Node 20
168
- uses : gradle/gradle-build-action@v2
169
-
170
- - name : Build native test server
171
- run : ./gradlew :temporal-test-server:build
161
+ if : matrix.os_family != 'Linux'
162
+ uses : gradle/actions/setup-gradle@v4
172
163
164
+ - name : Build native test server (non-Docker)
165
+ if : matrix.os_family != 'Linux'
166
+ run : |
167
+ ./gradlew :temporal-test-server:build
168
+
169
+ - name : Build native test server (Docker)
170
+ if : matrix.os_family == 'Linux'
171
+ run : |
172
+ docker run \
173
+ --rm -w /github/workspace -v "$(pwd):/github/workspace" \
174
+ $(docker build -q ./docker/native-image) \
175
+ sh -c "./gradlew :temporal-test-server:build"
173
176
# path ends in a wildcard because on windows the file ends in '.exe'
174
177
# path excludes *.txt because native-image also writes a build manifest txt file
175
178
- name : Upload executable to workflow
176
- # FIXME: v4+ requires Node 20
177
- uses : actions/upload-artifact@v3
179
+ uses : actions/upload-artifact@v4
178
180
with :
179
181
name : ${{ matrix.os_family }}_${{ matrix.arch }}
180
182
path : |
@@ -185,16 +187,15 @@ jobs:
185
187
186
188
attach_to_release :
187
189
name : Attach native executables to release
188
- needs : build_native_images
190
+ needs : [ build_native_images, create_draft_release]
189
191
runs-on : ubuntu-latest
190
192
steps :
191
193
- name : Audit gh version
192
194
run : gh --version
193
195
194
196
# when no artifact is specified, all artifacts are downloaded and expanded into CWD
195
197
- name : Fetch executables
196
- # Need v3 here to stay compatible with the build_native_images job.
197
- uses : actions/download-artifact@v3-node20
198
+ uses : actions/download-artifact@v4
198
199
199
200
# example: linux_amd64/ -> temporal-test-server_1.2.3_linux_amd64
200
201
# the name of the directory created becomes the basename of the archive (*.tar.gz or *.zip) and
0 commit comments