-
Notifications
You must be signed in to change notification settings - Fork 139
chore: Fix CI after GHA's drop of node16 actions #1574
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
Merged
mjameswh
merged 40 commits into
temporalio:main
from
mjameswh:fix-gha-node16-deprecation
Dec 3, 2024
Merged
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 056e7e0
Fix incorrect runner names
mjameswh d549df3
Add distinct workflow for "release" native build
mjameswh 1335ef3
Restore missing property
mjameswh 3b6a7fb
Remove leftover container property
mjameswh 54294c1
Use a PR label to disable use of the cache
mjameswh 2f2c904
Use a PR label to disable use of the cache
mjameswh 0615d7c
EOL comment is mistaken as docker image name
mjameswh e1f050e
Fix incorrect interpolation in env var
mjameswh 75e39dd
protoc download url
mjameswh af04ce3
Incorrect target
mjameswh 41fa61f
Fix frequent test flake on slot supplier
mjameswh 8a18560
Add timeouts
mjameswh 015c34b
Address review comments
mjameswh fdd47d5
Only do non-reuse-v8-context integration tests on one platform
mjameswh 58617b9
GHA: Move lint and docs to external wf definition
mjameswh 7a8b70c
More refactors
mjameswh 6908c85
Scale down runners
mjameswh 00a03f6
Publish to verdaccio, no longer need distinct build-packages job
mjameswh 577a565
Debugging somes bugs
mjameswh dc1312b
Debugging somes bugs
mjameswh 5ed8299
Debugging somes bugs
mjameswh 04547d6
Debugging somes bugs
mjameswh 3be1f98
Debugging somes bugs
mjameswh aa6fbf0
Debugging somes bugs
mjameswh 5f3bbed
Debugging somes bugs
mjameswh c1c44f2
Remove debugging stuff
mjameswh 28cb997
Minor fixes
mjameswh c5abf50
Minor fixes
mjameswh c8fb8fb
Fix issue on windows
mjameswh 8170cc2
Add comment on a flaky test
mjameswh 3e172e2
Avoid problems on windows
mjameswh 89c307d
Debugging somes bugs
mjameswh 19fe980
try a fix for tmpdir on windows
mjameswh f716f69
Debugging somes bugs
mjameswh 190f2bb
Debugging somes bugs
mjameswh b1b3e0f
Debugging somes bugs
mjameswh 7792dd8
Debugging somes bugs
mjameswh 4fe6fe9
Try not installing rust
mjameswh 4028b6f
Remove testing triggers
mjameswh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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: | ||
|
|
@@ -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 | ||
|
|
||
|
|
@@ -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] | ||
| 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: | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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: | ||
|
|
@@ -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: | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.