Skip to content
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

[WIP] Fix CI after GHA's drop of node16 actions #2332

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 18 additions & 25 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -138,16 +138,9 @@ 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:
ref: ${{ env.INPUT_REF }}

Expand All @@ -156,25 +149,26 @@ jobs:
- name: Temporary tag
run: git tag "$INPUT_TAG"

- name: Set up Java
# FIXME: v4+ requires Node 20
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
- name: Build native test server (non-Docker)
if: matrix.os_family != 'Linux'
run: |
./gradlew -x :temporal-serviceclient:updateSubmodules :temporal-test-server:build

- 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
- name: Build native test server (Docker)
if: matrix.os_family == 'Linux'
run: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you didn't run this task in a container?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Missed a commit. That will make more sense now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this step still make sense to run in a container?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container parameter only exists at the job-level. Steps run with whatever runner/container was set by the job.

A possible alternative is to use a docker image as an action, but there are a few limitations to that approach. But trying it that now to see if that would work.

docker run \
--rm -v "$(pwd):/workspace" -w /workspace \
ghcr.io/graalvm/graalvm-community:21-ol7 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the graal compiler should come from our plugin not the environment so why did you need to use a graal docker image here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by openjdk:21-jdk-oraclelinux7.

sh -c '
yum install -y git && \
./gradlew -x :temporal-serviceclient:updateSubmodules :temporal-test-server:build
'

# 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: |
Expand All @@ -193,8 +187,7 @@ jobs:

# 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
Expand Down
Loading