Skip to content

Commit a44015b

Browse files
authored
fix(ci): build Linux ARM releases natively (#29)
Co-authored-by: Mark Stuart <mstuart@users.noreply.github.com>
1 parent 7e8363f commit a44015b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
78

89
permissions: {}
910

@@ -21,7 +22,10 @@ jobs:
2122
- os: ubuntu-latest
2223
target: x86_64-unknown-linux-gnu
2324
artifact: code-memory
24-
- os: ubuntu-latest
25+
# Build ARM64 natively. Cross-compiling this target from x64 pulls
26+
# native-tls through fastembed and fails in openssl-sys because the
27+
# runner does not have an ARM64 OpenSSL development toolchain.
28+
- os: ubuntu-24.04-arm
2529
target: aarch64-unknown-linux-gnu
2630
artifact: code-memory
2731
- os: windows-latest
@@ -40,13 +44,6 @@ jobs:
4044
with:
4145
targets: ${{ matrix.target }}
4246

43-
- name: Install cross-compilation tools (Linux ARM64)
44-
if: matrix.target == 'aarch64-unknown-linux-gnu'
45-
run: |
46-
sudo apt-get update
47-
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
48-
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
49-
5047
- name: Build
5148
run: cargo build --release --target ${{ matrix.target }}
5249

@@ -69,6 +66,7 @@ jobs:
6966
path: code-memory-${{ github.ref_name }}-${{ matrix.target }}.*
7067

7168
release:
69+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
7270
needs: build
7371
runs-on: ubuntu-latest
7472
permissions:
@@ -88,6 +86,7 @@ jobs:
8886
generate_release_notes: true
8987

9088
publish-npm:
89+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
9190
needs: release
9291
runs-on: ubuntu-latest
9392
permissions:

0 commit comments

Comments
 (0)