Skip to content

Commit 14e0ec0

Browse files
authored
fix: configure cross-compilation environment for OpenSSL and RocksDB (#140)
* fix: configure cross-compilation environment for OpenSSL and RocksDB - Add setup-cross-build action to configure Docker images with OpenSSL dev headers for ARM64 Linux cross-compilation - Add cross_image to Linux matrix entries for custom Docker builds - Add Prepare RocksDB build env step for bindgen/libclang on Linux - Add permissions: contents: write for release asset uploads - Update checkout to v4 and rust-cache to v2 - Use pinned RUST_VERSION instead of stable * bump forc-node to 0.71.1
1 parent 498176d commit 14e0ec0

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,21 @@ jobs:
181181
runs-on: ${{ matrix.job.os }}
182182
if: github.event_name == 'release' && github.event.action == 'published'
183183
needs: cancel-previous-runs
184+
permissions:
185+
contents: write
184186
strategy:
185187
matrix:
186188
job:
187189
- os: ubuntu-latest
188190
platform: linux
189191
target: x86_64-unknown-linux-gnu
190192
target_suffix: linux_amd64
193+
cross_image: x86_64-linux-gnu
191194
- os: ubuntu-latest
192195
platform: linux
193196
target: aarch64-unknown-linux-gnu
194197
target_suffix: linux_arm64
198+
cross_image: aarch64-linux-gnu
195199
- os: macos-latest
196200
platform: darwin
197201
target: x86_64-apple-darwin
@@ -202,7 +206,7 @@ jobs:
202206
target_suffix: darwin_arm64
203207
steps:
204208
- name: Checkout sources
205-
uses: actions/checkout@v2
209+
uses: actions/checkout@v4
206210

207211
- name: Extract crate name from tag
208212
id: extract_crate
@@ -226,21 +230,31 @@ jobs:
226230
echo "Crate $CRATE_NAME is library-only, skipping binary build"
227231
fi
228232
229-
- name: Install toolchain
233+
- name: Setup cross build environment
230234
if: steps.check_binary.outputs.has_binary == 'true'
231-
uses: actions-rs/toolchain@v1
235+
uses: FuelLabs/sway-nightly-binaries/.github/actions/setup-cross-build@0f842ee1f5c50f9260f0e6d09367b415dc572af8
232236
with:
233-
profile: minimal
234-
toolchain: stable
235237
target: ${{ matrix.job.target }}
236-
override: true
238+
cross_image: ${{ matrix.job.cross_image }}
239+
os: ${{ matrix.job.os }}
240+
rust_version: ${{ env.RUST_VERSION }}
237241

238-
- uses: Swatinem/rust-cache@v1
242+
- uses: Swatinem/rust-cache@v2
239243
if: steps.check_binary.outputs.has_binary == 'true'
240244
with:
241245
cache-on-failure: true
242246
key: "${{ matrix.job.target }}"
243247

248+
- name: Prepare RocksDB build env
249+
if: steps.check_binary.outputs.has_binary == 'true' && runner.os == 'Linux'
250+
env:
251+
DEBIAN_FRONTEND: noninteractive
252+
run: |
253+
sudo apt-get update
254+
sudo apt-get install -y build-essential clang llvm-dev libclang-dev pkg-config
255+
echo "LIBCLANG_PATH=$(llvm-config --libdir)" >> "$GITHUB_ENV"
256+
echo "BINDGEN_EXTRA_CLANG_ARGS=--sysroot=/usr" >> "$GITHUB_ENV"
257+
244258
- name: Use Cross
245259
if: steps.check_binary.outputs.has_binary == 'true'
246260
uses: baptiste0928/cargo-install@v1

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

forc-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.71.1 (January 7th, 2026)
2+
3+
- Fix CI cross-compilation for ARM64 Linux with OpenSSL and RocksDB dependencies
4+
15
# 0.71.0 (January 7th, 2026)
26

37
- Previous release from `FuelLabs/sway` repository

forc-node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "forc-node"
3-
version = "0.71.0"
3+
version = "0.71.1"
44
description = "a wrapper around fuel-core to bootstrap nodes"
55
edition = "2021"
66
authors.workspace = true

0 commit comments

Comments
 (0)