Skip to content

Commit cefc492

Browse files
authored
[Fix] Cross compiled file name (#65)
1 parent e782cb9 commit cefc492

File tree

6 files changed

+403
-309
lines changed

6 files changed

+403
-309
lines changed

.github/workflows/build-native-ext.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on: # build when publishing a release
77
jobs:
88
build-binaries:
99
strategy:
10-
fail-fast: true
10+
fail-fast: false
1111
matrix:
1212
ruby:
1313
- 2.7.6
@@ -20,18 +20,21 @@ jobs:
2020
- macos-arm
2121
include:
2222
- os_arch: ubuntu-x86
23-
os: ubuntu-18.04
23+
os: ubuntu-latest
2424
target: x86_64-unknown-linux-gnu
25+
arch: x86_64
2526
- os_arch: ubuntu-arm
26-
os: ubuntu-18.04
27+
os: ubuntu-latest
2728
target: aarch64-unknown-linux-gnu
28-
rustflags: '-C linker=aarch64-linux-gnu-gcc'
29+
arch: arm64
2930
- os_arch: macos-x86
3031
os: macos-latest
3132
target: x86_64-apple-darwin
33+
arch: x86_64
3234
- os_arch: macos-arm
3335
os: macos-latest
3436
target: aarch64-apple-darwin
37+
arch: arm64
3538

3639
runs-on: ${{ matrix.os }}
3740
steps:
@@ -55,12 +58,12 @@ jobs:
5558
- name: Add ${{ matrix.target }} rust target
5659
run: rustup target add ${{ matrix.target }}
5760

58-
- if: ${{ matrix.os == 'ubuntu-18.04' }}
61+
- if: ${{ matrix.os == 'ubuntu-latest' }}
5962
name: Print libc version
6063
run: ldd --version
6164

62-
- if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
63-
name: Install gcc-aarch64-linux-gnu
65+
- if: ${{ matrix.os_arch == 'ubuntu-arm' }}
66+
name: Install gcc-aarch64-linux-gnu linker
6467
run: sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu
6568

6669
- uses: Swatinem/rust-cache@v2
@@ -73,8 +76,13 @@ jobs:
7376

7477
- name: Compile native extension
7578
id: package
79+
env:
80+
TARGET_ARCH: ${{ matrix.arch }}
81+
CARGO_BUILD_TARGET: ${{ matrix.target }}
82+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
7683
run: |
7784
bundle exec rake thermite:tarball
85+
echo bridge-*.tar.gz
7886
echo "tarball=$(echo bridge-*.tar.gz)" >> $GITHUB_OUTPUT
7987
8088
- name: Upload artifacts

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require 'bundler/gem_tasks'
22
require 'rbs_protobuf'
33
require 'fileutils'
44
require 'thermite/tasks'
5+
require_relative 'lib/thermite_patch'
56

67
API_PROTO_ROOT = 'bridge/sdk-core/protos/api_upstream'.freeze
78
CORE_PROTO_ROOT = 'bridge/sdk-core/protos/local'.freeze

0 commit comments

Comments
 (0)