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

chore: Fix CI after GHA's drop of node16 actions #1574

Merged
merged 40 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b8b8877
chore: Fix CI after GHA's drop of node16 actions
mjameswh Nov 26, 2024
056e7e0
Fix incorrect runner names
mjameswh Nov 26, 2024
d549df3
Add distinct workflow for "release" native build
mjameswh Nov 26, 2024
1335ef3
Restore missing property
mjameswh Nov 26, 2024
3b6a7fb
Remove leftover container property
mjameswh Nov 26, 2024
54294c1
Use a PR label to disable use of the cache
mjameswh Nov 26, 2024
2f2c904
Use a PR label to disable use of the cache
mjameswh Nov 26, 2024
0615d7c
EOL comment is mistaken as docker image name
mjameswh Nov 26, 2024
e1f050e
Fix incorrect interpolation in env var
mjameswh Nov 26, 2024
75e39dd
protoc download url
mjameswh Nov 26, 2024
af04ce3
Incorrect target
mjameswh Nov 26, 2024
41fa61f
Fix frequent test flake on slot supplier
mjameswh Nov 26, 2024
8a18560
Add timeouts
mjameswh Nov 27, 2024
015c34b
Address review comments
mjameswh Nov 28, 2024
fdd47d5
Only do non-reuse-v8-context integration tests on one platform
mjameswh Nov 28, 2024
58617b9
GHA: Move lint and docs to external wf definition
mjameswh Nov 28, 2024
7a8b70c
More refactors
mjameswh Nov 29, 2024
6908c85
Scale down runners
mjameswh Nov 29, 2024
00a03f6
Publish to verdaccio, no longer need distinct build-packages job
mjameswh Nov 29, 2024
577a565
Debugging somes bugs
mjameswh Nov 29, 2024
dc1312b
Debugging somes bugs
mjameswh Nov 29, 2024
5ed8299
Debugging somes bugs
mjameswh Nov 29, 2024
04547d6
Debugging somes bugs
mjameswh Nov 29, 2024
3be1f98
Debugging somes bugs
mjameswh Nov 29, 2024
aa6fbf0
Debugging somes bugs
mjameswh Nov 29, 2024
5f3bbed
Debugging somes bugs
mjameswh Nov 29, 2024
c1c44f2
Remove debugging stuff
mjameswh Nov 29, 2024
28cb997
Minor fixes
mjameswh Nov 29, 2024
c5abf50
Minor fixes
mjameswh Nov 30, 2024
c8fb8fb
Fix issue on windows
mjameswh Nov 30, 2024
8170cc2
Add comment on a flaky test
mjameswh Nov 30, 2024
3e172e2
Avoid problems on windows
mjameswh Nov 30, 2024
89c307d
Debugging somes bugs
mjameswh Nov 30, 2024
19fe980
try a fix for tmpdir on windows
mjameswh Nov 30, 2024
f716f69
Debugging somes bugs
mjameswh Nov 30, 2024
190f2bb
Debugging somes bugs
mjameswh Nov 30, 2024
b1b3e0f
Debugging somes bugs
mjameswh Nov 30, 2024
7792dd8
Debugging somes bugs
mjameswh Nov 30, 2024
4fe6fe9
Try not installing rust
mjameswh Dec 2, 2024
4028b6f
Remove testing triggers
mjameswh Dec 3, 2024
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
79 changes: 29 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Continuous Integration

on: # rebuild any PRs and main branch changes
on:
pull_request:
push:
branches:
- main
- 'releases/*'
- releases/*

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -21,21 +21,19 @@ env:
jobs:
# Compile native bridge code for each target platform.
# Uploads the native library for each target as a build artifact.
compile-native-binaries:
compile-native-binaries-debug:
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
include:
# For Linux targets, use Buildjet's builders to get the oldest supported glibc version
- platform: linux-x64
runner: buildjet-4vcpu-ubuntu-2204
runner: ubuntu-latest-4-cores
target: x86_64-unknown-linux-gnu
container: quay.io/pypa/manylinux_2_24_x86_64
out-file: libtemporal_sdk_typescript_bridge.so
- platform: linux-arm
runner: buildjet-4vcpu-ubuntu-2204-arm
runner: ubuntu-24.04-arm64-2-core
target: aarch64-unknown-linux-gnu
container: quay.io/pypa/manylinux_2_24_aarch64
out-file: libtemporal_sdk_typescript_bridge.so
- platform: macos-x64
runner: macos-13
Expand All @@ -51,50 +49,37 @@ jobs:
out-file: temporal_sdk_typescript_bridge.dll
name: Compile Native Binaries (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
env:
# This is required to allow continuing usage of Node 16 for actions,
# as Node 20 won't run on the docker image we use for linux builds
# (Node 20 require glibc 2.28+, but container image has glibc 2.24).
# 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
defaults:
run:
shell: bash
steps:
- name: 'Checkout code'
# FIXME: v4+ requires Node 20
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: 'Cache index.node'
id: cached-artifact
# FIXME: v4+ requires Node 20
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./packages/core-bridge/releases
key: corebridge-artifactcache-${{ matrix.platform }}-${{ hashFiles('./packages/core-bridge/**/Cargo.lock', './packages/core-bridge/**/*.rs') }}

- name: Install Rust
if: steps.cached-artifact.outputs.cache-hit != 'true'
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}

- name: Install protoc
if: steps.cached-artifact.outputs.cache-hit != 'true'
# FIXME: v3+ requires Node 20
uses: arduino/setup-protoc@v2
uses: arduino/setup-protoc@v3
with:
# TODO: Upgrade proto once https://github.com/arduino/setup-protoc/issues/99 is fixed
version: '23.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust Cargo and Build cache
if: steps.cached-artifact.outputs.cache-hit != 'true'
# FIXME: v2.7.2+ requires Node 20
uses: Swatinem/[email protected]
uses: Swatinem/rust-cache@v2
with:
workspaces: packages/core-bridge -> target
prefix-key: corebridge-buildcache
Expand All @@ -107,19 +92,11 @@ jobs:
working-directory: ./packages/core-bridge
run: |
set -x
cargo build --release --target ${{ matrix.target }}
cargo build --target ${{ matrix.target }}
mkdir -p ./releases/${{ matrix.target }}
cp target/${{ matrix.target }}/release/${{ matrix.out-file }} ./releases/${{ matrix.target }}/index.node

- name: Print required GLIBC version
if: startsWith(matrix.platform, 'linux')
working-directory: ./packages/core-bridge
run: |
objdump -T ./releases/${{ matrix.target }}/index.node |
grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -V | tail -1
cp target/${{ matrix.target }}/debug/${{ matrix.out-file }} ./releases/${{ matrix.target }}/index.node

# FIXME: v4+ requires Node 20
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: corebridge-native-${{ matrix.platform }}
# Actual file will be named ${{ matrix.target }}/index.node
Expand All @@ -128,16 +105,17 @@ jobs:
# Gather native binaries for all platforms and build TypeScript @temporalio/* packages.
# Upload the built packages as a Verdaccio repository.
build-packages:
timeout-minutes: 10
needs:
- compile-native-binaries
- compile-native-binaries-debug
name: Build Packages
strategy:
# Using a matrix here ensure that Rust-related actions below can be easily be copied from the
# compile-binaries job and that the Rust build cache will be usable
matrix:
include:
- platform: linux-x64
runner: ubuntu-22.04
runner: ubuntu-latest-4-cores
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
defaults:
Expand All @@ -150,8 +128,7 @@ jobs:
submodules: recursive

- name: Download core-bridge native libraries
# Need v3 here to stay compatible with the compile-native-binaries job.
uses: actions/download-artifact@v3-node20
uses: actions/download-artifact@v4
with:
path: ./packages/core-bridge/releases/tmp

Expand Down Expand Up @@ -206,26 +183,29 @@ jobs:
# Run integration tests. Uses the native binaries built in compile-native-binaries,
# but build `@temporalio/*` packages locally.
integration-tests:
timeout-minutes: 10
needs:
- compile-native-binaries
- compile-native-binaries-debug
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
node: [16, 18, 20, 22]
josh-berry marked this conversation as resolved.
Show resolved Hide resolved
platform: [linux-x64, linux-arm, macos-x64, macos-arm, windows-x64]
reuse-v8-context: [true, false]
server: [cli] # FIXME: Add 'cloud'
include:
- platform: linux-x64
runner: ubuntu-latest
runner: ubuntu-latest-4-cores
- platform: linux-arm
runner: buildjet-4vcpu-ubuntu-2204-arm
runner: ubuntu-24.04-arm64-2-core
- platform: macos-x64
runner: macos-13
- platform: macos-arm
runner: macos-14
- platform: windows-x64
runner: windows-latest
exclude:
- server: ${{ vars.TEMPORAL_CLIENT_NAMESPACE == '' && 'cloud' || '' }}
runs-on: ${{ matrix.runner }}
name: Run Integration Tests (${{ matrix.platform }}, Node ${{ matrix.node }}, Reuse V8 Context ${{ matrix.reuse-v8-context }})
defaults:
Expand All @@ -238,8 +218,7 @@ jobs:
submodules: recursive

- name: Download core-bridge native libraries
# Need v3 here to stay compatible with the compile-native-binaries job.
uses: actions/download-artifact@v3-node20
uses: actions/download-artifact@v4
with:
name: corebridge-native-${{ matrix.platform }}
path: ./packages/core-bridge/releases
Expand Down Expand Up @@ -336,9 +315,9 @@ jobs:
- server: ${{ vars.TEMPORAL_CLIENT_NAMESPACE == '' && 'cloud' || '' }}
include:
- platform: linux-x64
runner: ubuntu-latest
runner: ubuntu-latest-4-cores
- platform: linux-arm
runner: buildjet-4vcpu-ubuntu-2204-arm
runner: ubuntu-24.04-arm64-2-core
- platform: macos-x64
runner: macos-13
- platform: macos-arm
Expand Down Expand Up @@ -471,7 +450,7 @@ jobs:
matrix:
include:
- platform: linux-x64
runner: ubuntu-22.04
runner: ubuntu-latest-4-cores
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
steps:
Expand Down Expand Up @@ -538,7 +517,7 @@ jobs:
matrix:
include:
- platform: linux-x64
runner: ubuntu-22.04
runner: ubuntu-latest-4-cores
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
steps:
Expand Down
Loading
Loading