@@ -18,15 +18,13 @@ jobs:
1818 # We use the Python manylinux image for glibc compatibility
1919 container : quay.io/pypa/manylinux2014_x86_64
2020 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
2221 - os : ubuntu-arm
2322 out-file : libtemporal_sdk_bridge.so
2423 out-prefix : linux-arm64
25- runsOn : buildjet-4vcpu-ubuntu-2204-arm
24+ runsOn : ubuntu-24.04-arm64-2-core
2625 # We use the Python manylinux image for glibc compatibility
2726 container : quay.io/pypa/manylinux2014_aarch64
2827 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
3028 - os : macos-intel
3129 out-file : libtemporal_sdk_bridge.dylib
3230 out-prefix : osx-x64
@@ -39,53 +37,53 @@ jobs:
3937 out-file : temporal_sdk_bridge.dll
4038 out-prefix : win-x64
4139 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
4940 steps :
5041 - name : Checkout repository
51- # FIXME: v4+ requires Node 20
52- uses : actions/checkout@v3
42+ uses : actions/checkout@v4
5343 with :
5444 submodules : recursive
5545
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-
6346 - name : Install Rust
47+ if : ${{ !matrix.container }}
6448 uses : dtolnay/rust-toolchain@stable
6549 with :
6650 toolchain : stable
6751
6852 - name : Setup Rust cache
69- # FIXME: v2.7.2+ requires Node 20
53+ if : ${{ !matrix.container }}
7054 # 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
7256 with :
7357 workspaces : src/Temporalio/Bridge
7458 key : ${{ matrix.os }}
7559
7660 - 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
7963 with :
8064 version : " 23.x"
8165 repo-token : ${{ secrets.GITHUB_TOKEN }}
8266
83- - name : Build
67+ - name : Build (non-Docker)
68+ if : ${{ !matrix.container }}
8469 run : cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release
8570
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+
8685 - name : Upload bridge library
87- # FIXME: v4+ requires Node 20
88- uses : actions/upload-artifact@v3
86+ uses : actions/upload-artifact@v4
8987 with :
9088 name : ${{ matrix.out-prefix }}-bridge
9189 path : src/Temporalio/Bridge/target/release/${{ matrix.out-file }}
10199 submodules : recursive
102100
103101 - 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
106103 with :
107104 path : bridge-libraries
108105
0 commit comments