Skip to content

Commit d9ffcc3

Browse files
ci: add multi-platform build tests (Linux ARM, macOS Intel, no-SIMD)
Add three new CI jobs to test platform compatibility: - test-linux-arm: Tests on ubuntu-24.04-arm (ARM64 Linux) - test-macos-intel: Tests on macos-15-intel (x86 macOS) - test-no-simd: Tests on ubuntu-latest with SIMD disabled via BLST_PORTABLE=1 and RUSTFLAGS target-cpu=x86-64, simulating an Ubuntu Docker container running on macOS ARM via QEMU emulation Each job builds and runs tests with both default and all features. Co-authored-by: Greg Nazario <greg@gnazar.io>
1 parent 6a40f72 commit d9ffcc3

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,85 @@ jobs:
7878
- name: Run tests (all features)
7979
run: cargo test -p aptos-sdk --all-targets --all-features
8080

81+
test-linux-arm:
82+
name: Test (Linux ARM64)
83+
runs-on: ubuntu-24.04-arm
84+
steps:
85+
- uses: actions/checkout@v6
86+
87+
- name: Install Rust
88+
uses: dtolnay/rust-toolchain@master
89+
with:
90+
toolchain: stable
91+
92+
- name: Cache cargo
93+
uses: Swatinem/rust-cache@v2
94+
95+
- name: Build
96+
run: cargo build -p aptos-sdk --all-targets
97+
98+
- name: Run tests
99+
run: cargo test -p aptos-sdk --all-targets
100+
101+
- name: Run tests (all features)
102+
run: cargo test -p aptos-sdk --all-targets --all-features
103+
104+
test-macos-intel:
105+
name: Test (macOS x86)
106+
runs-on: macos-15-intel
107+
steps:
108+
- uses: actions/checkout@v6
109+
110+
- name: Install Rust
111+
uses: dtolnay/rust-toolchain@master
112+
with:
113+
toolchain: stable
114+
115+
- name: Cache cargo
116+
uses: Swatinem/rust-cache@v2
117+
118+
- name: Build
119+
run: cargo build -p aptos-sdk --all-targets
120+
121+
- name: Run tests
122+
run: cargo test -p aptos-sdk --all-targets
123+
124+
- name: Run tests (all features)
125+
run: cargo test -p aptos-sdk --all-targets --all-features
126+
127+
test-no-simd:
128+
name: Test (Linux No SIMD - Docker Compatible)
129+
runs-on: ubuntu-latest
130+
env:
131+
# Disable BLST assembly optimizations for portability
132+
BLST_PORTABLE: "1"
133+
# Target baseline x86-64 without AVX/AVX2 SIMD extensions.
134+
# This simulates running in a Docker container on macOS ARM via
135+
# QEMU x86 emulation, where advanced SIMD instructions are unavailable.
136+
RUSTFLAGS: "-C target-cpu=x86-64"
137+
steps:
138+
- uses: actions/checkout@v6
139+
140+
- name: Install Rust
141+
uses: dtolnay/rust-toolchain@master
142+
with:
143+
toolchain: stable
144+
145+
- name: Cache cargo
146+
uses: Swatinem/rust-cache@v2
147+
148+
- name: Build (default features)
149+
run: cargo build -p aptos-sdk --all-targets
150+
151+
- name: Run tests (default features)
152+
run: cargo test -p aptos-sdk --all-targets
153+
154+
- name: Build (all features)
155+
run: cargo build -p aptos-sdk --all-targets --all-features
156+
157+
- name: Run tests (all features)
158+
run: cargo test -p aptos-sdk --all-targets --all-features
159+
81160
test-features:
82161
name: Test Feature Combinations
83162
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)