Skip to content

Commit a66d8ed

Browse files
authored
chore: Build bridge for arm linux (#698)
1 parent 954972e commit a66d8ed

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,9 @@ jobs:
113113
include:
114114
- os: ubuntu-18.04
115115
target: x86_64-unknown-linux-gnu
116-
# TODO: this compliation target fails
117-
# https://github.com/temporalio/sdk-typescript/runs/4241087289?check_suite_focus=true#step:8:119
118-
# - os: ubuntu-latest
119-
# target: aarch64-unknown-linux-gnu
116+
- os: ubuntu-18.04
117+
target: aarch64-unknown-linux-gnu
118+
rustflags: '-C linker=aarch64-linux-gnu-gcc'
120119
- os: macos-latest
121120
target: x86_64-apple-darwin
122121
- os: macos-latest
@@ -139,11 +138,16 @@ jobs:
139138
- name: Print libc version
140139
run: ldd --version
141140
if: ${{ matrix.os == 'ubuntu-18.04' }}
141+
- name: Install gcc-aarch64-linux-gnu
142+
run: sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu
143+
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
142144
# Don't build during install phase since we're going to explicitly build
143145
- run: npm ci --ignore-scripts
144146
- name: Compile all non-rust code
145147
run: npm run ci-build-no-rust
146148
- name: Cross compile rust code
149+
env:
150+
RUSTFLAGS: ${{ matrix.rustflags }}
147151
run: npx lerna run --stream build-rust-release -- -- --target ${{ matrix.target }}
148152
# Restore the CLI JS only on Windows because Windows build changes the
149153
# file attributes causing publish to think the change is uncommitted

etc/mac-cargo-config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copy this file to ~/.cargo/config.toml in order to cross-compile for Linux and Windows
22
[target.x86_64-unknown-linux-gnu]
3-
linker = "x86_64-unknown-linux-gnu-gcc"
3+
linker = "x86_64-linux-gnu-gcc"
44
[target.aarch64-unknown-linux-gnu]
5-
linker = "aarch64-unknown-linux-gnu-gcc"
5+
linker = "aarch64-linux-gnu-gcc"
66
[target.x86_64-pc-windows-gnu]
77
linker = "/usr/local/bin/x86_64-w64-mingw32-gcc"

0 commit comments

Comments
 (0)