@@ -31,34 +31,50 @@ jobs:
31
31
include :
32
32
# For Linux targets, use Buildjet's builders to get the oldest supported glibc version
33
33
- platform : linux-x64
34
- runner : buildjet-4vcpu-ubuntu-2004
34
+ runner : buildjet-4vcpu-ubuntu-2204
35
35
target : x86_64-unknown-linux-gnu
36
+ container : quay.io/pypa/manylinux_2_24_x86_64
37
+ out-file : libtemporal_sdk_typescript_bridge.so
36
38
- platform : linux-arm
37
39
runner : buildjet-4vcpu-ubuntu-2204-arm
38
40
target : aarch64-unknown-linux-gnu
41
+ container : quay.io/pypa/manylinux_2_24_aarch64
42
+ out-file : libtemporal_sdk_typescript_bridge.so
39
43
- platform : macos-x64
40
44
runner : macos-12
41
45
target : x86_64-apple-darwin
46
+ out-file : libtemporal_sdk_typescript_bridge.dylib
42
47
- platform : macos-arm
43
48
runner : macos-14
44
49
target : aarch64-apple-darwin
50
+ out-file : libtemporal_sdk_typescript_bridge.dylib
45
51
- platform : windows-x64
46
52
runner : windows-latest
47
53
target : x86_64-pc-windows-msvc
54
+ out-file : temporal_sdk_typescript_bridge.dll
48
55
name : Compile Native Binaries (${{ matrix.platform }})
49
56
runs-on : ${{ matrix.runner }}
57
+ container : ${{ matrix.container }}
58
+ env :
59
+ # This is required to allow continuing usage of Node 16 for actions,
60
+ # as Node 20 won't run on the docker image we use for linux builds
61
+ # (Node 20 require glibc 2.28+, but container image has glibc 2.24).
62
+ # https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/
63
+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
50
64
defaults :
51
65
run :
52
66
shell : bash
53
67
steps :
54
68
- name : ' Checkout code'
55
- uses : actions/checkout@v4
69
+ # FIXME: v4+ requires Node 20
70
+ uses : actions/checkout@v3
56
71
with :
57
72
submodules : recursive
58
73
59
74
- name : ' Cache index.node'
60
75
id : cached-artifact
61
- uses : actions/cache@v4
76
+ # FIXME: v4+ requires Node 20
77
+ uses : actions/cache@v3
62
78
with :
63
79
path : ./packages/core-bridge/releases
64
80
key : corebridge-artifactcache-${{ matrix.platform }}-${{ hashFiles('./packages/core-bridge/**/Cargo.lock', './packages/core-bridge/**/*.rs') }}
@@ -71,19 +87,17 @@ jobs:
71
87
72
88
- name : Install protoc
73
89
if : steps.cached-artifact.outputs.cache-hit != 'true'
74
- uses : arduino/setup-protoc@v3
90
+ # FIXME: v3+ requires Node 20
91
+ uses : arduino/setup-protoc@v2
75
92
with :
76
93
# TODO: Upgrade proto once https://github.com/arduino/setup-protoc/issues/99 is fixed
77
94
version : ' 23.x'
78
95
repo-token : ${{ secrets.GITHUB_TOKEN }}
79
96
80
- - name : Print libc version
81
- if : (steps.cached-artifact.outputs.cache-hit != 'true') && startsWith(matrix.platform, 'linux')
82
- run : ldd --version
83
-
84
97
- name : Rust Cargo and Build cache
85
98
if : steps.cached-artifact.outputs.cache-hit != 'true'
86
- uses : Swatinem/rust-cache@v2
99
+ # FIXME: v2.7.2+ requires Node 20
100
+ uses : Swatinem/rust-cache@v2.7.1
87
101
with :
88
102
workspaces : packages/core-bridge -> target
89
103
prefix-key : corebridge-buildcache
@@ -98,13 +112,17 @@ jobs:
98
112
set -x
99
113
cargo build --release --target ${{ matrix.target }}
100
114
mkdir -p ./releases/${{ matrix.target }}
101
- # FIXME: This is aweful. Surely there's a better way, but I'm out of ideas.
102
- native_lib_file=$(
103
- ls target/${{ matrix.target }}/release/{lib,}temporal_sdk_typescript_bridge.{dylib,so,dll} 2>/dev/null || true
104
- )
105
- cp $native_lib_file ./releases/${{ matrix.target }}/index.node
115
+ cp target/${{ matrix.target }}/release/${{ matrix.out-file }} ./releases/${{ matrix.target }}/index.node
106
116
107
- - uses : actions/upload-artifact@v4
117
+ - name : Print required GLIBC version
118
+ if : startsWith(matrix.platform, 'linux')
119
+ working-directory : ./packages/core-bridge
120
+ run : |
121
+ objdump -T ./releases/${{ matrix.target }}/index.node |
122
+ grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -V | tail -1
123
+
124
+ # FIXME: v4+ requires Node 20
125
+ - uses : actions/upload-artifact@v3
108
126
with :
109
127
name : corebridge-native-${{ matrix.platform }}
110
128
# Actual file will be named ${{ matrix.target }}/index.node
@@ -135,7 +153,8 @@ jobs:
135
153
submodules : recursive
136
154
137
155
- name : Download core-bridge native libraries
138
- uses : actions/download-artifact@v4
156
+ # Need v3 here to stay compatible with the compile-native-binaries job.
157
+ uses : actions/download-artifact@v3-node20
139
158
with :
140
159
path : ./packages/core-bridge/releases/tmp
141
160
@@ -222,7 +241,8 @@ jobs:
222
241
submodules : recursive
223
242
224
243
- name : Download core-bridge native libraries
225
- uses : actions/download-artifact@v4
244
+ # Need v3 here to stay compatible with the compile-native-binaries job.
245
+ uses : actions/download-artifact@v3-node20
226
246
with :
227
247
name : corebridge-native-${{ matrix.platform }}
228
248
path : ./packages/core-bridge/releases
@@ -544,7 +564,9 @@ jobs:
544
564
if : env.IS_MAIN_OR_RELEASE == 'true'
545
565
run : npx vercel deploy packages/docs/build -t ${{ secrets.VERCEL_TOKEN }} --name typescript --scope temporal --prod --yes
546
566
547
- - name : Deploy draft docs
548
- # Don't run on forks, since secrets won't be available, and command will fail
549
- if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.ref != 'refs/heads/main'
550
- run : npx vercel deploy packages/docs/build -t ${{ secrets.VERCEL_TOKEN }} --name typescript --scope temporal --yes
567
+ # FIXME: This is not working properly, and should probably be done only from the main branch anyway
568
+ # (and "Deploy prod docs" should only be done when we publish a new release)
569
+ # - name: Deploy draft docs
570
+ # # Don't run on forks, since secrets won't be available, and command will fail
571
+ # if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.ref != 'refs/heads/main'
572
+ # run: npx vercel deploy packages/docs/build -t ${{ secrets.VERCEL_TOKEN }} --name typescript --scope temporal --yes
0 commit comments