Skip to content

fix: simplify ARM benchmark to native Linux only, remove cross-compile #10

fix: simplify ARM benchmark to native Linux only, remove cross-compile

fix: simplify ARM benchmark to native Linux only, remove cross-compile #10

Workflow file for this run

name: ARM64 BLAKE3 Benchmark
on:
push:
branches: [main]
workflow_dispatch:
jobs:
native-arm-benchmark:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Run native ARM64 BLAKE3 benchmark
run: |
mkdir -p /tmp/arm_bench
cat > /tmp/arm_bench/main.rs << 'RUST'
use std::time::Instant;

Check failure on line 21 in .github/workflows/arm-benchmark.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/arm-benchmark.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
fn main() {
let data = b"axiom os arm64 blake3 benchmark data";
let iterations = 10000u64;
for _ in 0..1000 { let _ = blake3::hash(data); }
let start = Instant::now();
for _ in 0..iterations { let _ = blake3::hash(data); }
let elapsed = start.elapsed();
println!("AXIOM OS Native ARM64 BLAKE3 Benchmark");
println!("Platform: {}", std::env::consts::ARCH);
println!("Iterations: {}", iterations);
println!("ns/op: {}", elapsed.as_nanos() as u64 / iterations);
println!("us/op: {}", elapsed.as_micros() as u64 / iterations);
let hash = blake3::hash(data);
println!("Hash: {:02x?}", &hash.as_bytes()[..8]);
}
RUST
cat > /tmp/arm_bench/Cargo.toml << 'TOML'
[package]
name = "arm_bench"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "arm_bench"
path = "main.rs"
[dependencies]
blake3 = "1.8.3"
TOML
cd /tmp/arm_bench
cargo run --release 2>&1 | tee $GITHUB_WORKSPACE/native_arm_benchmark.txt
cat $GITHUB_WORKSPACE/native_arm_benchmark.txt
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: arm-benchmark-results
path: native_arm_benchmark.txt