@@ -18,15 +18,13 @@ jobs:
18
18
# We use the Python manylinux image for glibc compatibility
19
19
container : quay.io/pypa/manylinux2014_x86_64
20
20
protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
21
- curl-download : https://github.com/stunnel/static-curl/releases/download/8.8.0/curl-linux-x86_64-8.8.0.tar.xz
22
21
- os : ubuntu-arm
23
22
out-file : libtemporal_sdk_bridge.so
24
23
out-prefix : linux-arm64
25
- runsOn : buildjet-4vcpu-ubuntu-2204-arm
24
+ runsOn : ubuntu-24.04-arm64-2-core
26
25
# We use the Python manylinux image for glibc compatibility
27
26
container : quay.io/pypa/manylinux2014_aarch64
28
27
protobuf-url : https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip
29
- curl-download : https://github.com/stunnel/static-curl/releases/download/8.8.0/curl-linux-aarch64-8.8.0.tar.xz
30
28
- os : macos-intel
31
29
out-file : libtemporal_sdk_bridge.dylib
32
30
out-prefix : osx-x64
@@ -39,53 +37,53 @@ jobs:
39
37
out-file : temporal_sdk_bridge.dll
40
38
out-prefix : win-x64
41
39
runs-on : ${{ matrix.runsOn || matrix.os }}
42
- container : ${{ matrix.container }}
43
- env :
44
- # This is required to allow continuing usage of Node 16 for actions,
45
- # as Node 20 won't run on the docker image we use for linux builds
46
- # (Node 20 require glibc 2.28+, but container image has glibc 2.17).
47
- # https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/
48
- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
49
40
steps :
50
41
- name : Checkout repository
51
- # FIXME: v4+ requires Node 20
52
- uses : actions/checkout@v3
42
+ uses : actions/checkout@v4
53
43
with :
54
44
submodules : recursive
55
45
56
- # Need to update cURL on Linux for the Rust install step
57
- - name : Update cURL
58
- if : ${{ matrix.curl-download }}
59
- run : |
60
- curl --fail -L "${{ matrix.curl-download }}" -o curl.tar.xz
61
- tar -xJvf curl.tar.xz -C /usr/local/bin
62
-
63
46
- name : Install Rust
47
+ if : ${{ !matrix.container }}
64
48
uses : dtolnay/rust-toolchain@stable
65
49
with :
66
50
toolchain : stable
67
51
68
52
- name : Setup Rust cache
69
- # FIXME: v2.7.2+ requires Node 20
53
+ if : ${{ !matrix.container }}
70
54
# Fixed version due to https://github.com/Swatinem/rust-cache/issues/183#issuecomment-1893979126
71
- uses : Swatinem/rust-cache@v2.7.1
55
+ uses : Swatinem/rust-cache@v2
72
56
with :
73
57
workspaces : src/Temporalio/Bridge
74
58
key : ${{ matrix.os }}
75
59
76
60
- name : Install protoc
77
- # FIXME: v3+ requires Node 20
78
- uses : arduino/setup-protoc@v2
61
+ if : ${{ !matrix.container }}
62
+ uses : arduino/setup-protoc@v3
79
63
with :
80
64
version : " 23.x"
81
65
repo-token : ${{ secrets.GITHUB_TOKEN }}
82
66
83
- - name : Build
67
+ - name : Build (non-Docker)
68
+ if : ${{ !matrix.container }}
84
69
run : cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release
85
70
71
+ - name : Build (Docker)
72
+ if : ${{ matrix.container }}
73
+ run : |
74
+ docker run --rm -v "$(pwd):/workspace" -w /workspace \
75
+ ${{ matrix.container }} \
76
+ sh -c ' \
77
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y \
78
+ && . $HOME/.cargo/env \
79
+ && curl -LO ${{ matrix.protobuf-url }} \
80
+ && unzip protoc-*.zip -d /usr/local/protobuf \
81
+ && export PATH="$PATH:/usr/local/protobuf/bin" \
82
+ && cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
83
+ '
84
+
86
85
- name : Upload bridge library
87
- # FIXME: v4+ requires Node 20
88
- uses : actions/upload-artifact@v3
86
+ uses : actions/upload-artifact@v4
89
87
with :
90
88
name : ${{ matrix.out-prefix }}-bridge
91
89
path : src/Temporalio/Bridge/target/release/${{ matrix.out-file }}
101
99
submodules : recursive
102
100
103
101
- name : Download bridge libraries
104
- # Need v3 here to stay compatible with the compile-native-binaries job.
105
- uses : actions/download-artifact@v3-node20
102
+ uses : actions/download-artifact@v4
106
103
with :
107
104
path : bridge-libraries
108
105
0 commit comments