-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI after GHA's drop of node16 actions #2338
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ jobs: | |
distribution: "temurin" | ||
|
||
- name: Set up Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Set up signing key | ||
run: mkdir -p "$HOME/.gnupg" && echo -n "$KEY" | base64 -d > "$HOME/.gnupg/secring.gpg" | ||
|
@@ -128,7 +128,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- runner: buildjet-2vcpu-ubuntu-1804 | ||
- runner: ubuntu-latest | ||
os_family: linux | ||
arch: amd64 | ||
- runner: macos-13 | ||
|
@@ -138,43 +138,45 @@ jobs: | |
os_family: windows | ||
arch: amd64 | ||
runs-on: ${{ matrix.runner }} | ||
env: | ||
# This is required to allow continuing usage of Node 16 for actions, | ||
# as Node 20 won't run on the builder we use for linux builds | ||
# (Node 20 require glibc 2.28+, but ubuntu-1804 has glibc 2.27). | ||
# https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/ | ||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | ||
steps: | ||
- name: Checkout repo | ||
# FIXME: v4+ requires Node 20 | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
ref: ${{ env.INPUT_REF }} | ||
|
||
# See comment on temporary tag above. tldr: this is a local tag; never | ||
# gets pushed | ||
- name: Temporary tag | ||
run: git tag "$INPUT_TAG" | ||
|
||
- name: Set up Java | ||
# FIXME: v4+ requires Node 20 | ||
uses: actions/setup-java@v3 | ||
if: matrix.os_family != 'Linux' | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "11" | ||
distribution: "temurin" | ||
|
||
- name: Set up Gradle | ||
# FIXME: v3+ requires Node 20 | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Build native test server | ||
run: ./gradlew :temporal-test-server:build | ||
if: matrix.os_family != 'Linux' | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build native test server (non-Docker) | ||
if: matrix.os_family != 'Linux' | ||
run: | | ||
./gradlew :temporal-test-server:build | ||
|
||
- name: Build native test server (Docker) | ||
if: matrix.os_family == 'Linux' | ||
run: | | ||
docker run \ | ||
--rm -w /github/workspace -v "$(pwd):/github/workspace" \ | ||
$(docker build -q ./docker/native-image) \ | ||
sh -c "./gradlew :temporal-test-server:build" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that you moved installation stuff to a docker image, you probably no longer need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, fixed |
||
# path ends in a wildcard because on windows the file ends in '.exe' | ||
# path excludes *.txt because native-image also writes a build manifest txt file | ||
- name: Upload executable to workflow | ||
# FIXME: v4+ requires Node 20 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os_family }}_${{ matrix.arch }} | ||
path: | | ||
|
@@ -185,16 +187,15 @@ jobs: | |
|
||
attach_to_release: | ||
name: Attach native executables to release | ||
needs: build_native_images | ||
needs: [build_native_images, create_draft_release] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Audit gh version | ||
run: gh --version | ||
|
||
# when no artifact is specified, all artifacts are downloaded and expanded into CWD | ||
- name: Fetch executables | ||
# Need v3 here to stay compatible with the build_native_images job. | ||
uses: actions/download-artifact@v3-node20 | ||
uses: actions/download-artifact@v4 | ||
|
||
# example: linux_amd64/ -> temporal-test-server_1.2.3_linux_amd64 | ||
# the name of the directory created becomes the basename of the archive (*.tar.gz or *.zip) and | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Use an old version of Ubuntu to build the test server to maintain compatibility with | ||
# older versions of glibc, specifically glib 2.17. | ||
FROM ubuntu:18.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be pertinent to add some comments in this docker file explaining to outside readers why we are using an old distro. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment |
||
ENV JAVA_HOME=/opt/java/openjdk | ||
COPY --from=eclipse-temurin:21 $JAVA_HOME $JAVA_HOME | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
RUN apt-get update | ||
RUN apt-get install -y git build-essential zlib1g-dev | ||
# Avoid errors like: "fatal: detected dubious ownership in repository" | ||
RUN git config --global --add safe.directory '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other places we use
gradle/actions/setup-gradle@v3
. Should update those too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done