From f04594c91bd234c7078f4bdbe0d6a082977eb02c Mon Sep 17 00:00:00 2001 From: brandonin Date: Sat, 14 Mar 2026 11:21:57 -0700 Subject: [PATCH 1/5] Add aarch64 Linux support (DGX Spark / GB10) - Add aarch64-unknown-linux-gnu build target to the release workflow - Add .cargo/config.toml to configure the cross-linker for aarch64 - Update install.sh to detect arm64/aarch64 and download the correct binary (popcorn-cli-linux-aarch64.tar.gz) instead of the x86-64 build --- .cargo/config.toml | 2 ++ .github/workflows/build.yml | 8 ++++++++ install.sh | 9 +++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..3c32d25 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1640c6a..34dc3af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,13 @@ jobs: compress_cmd: tar -czf compress_ext: .tar.gz + - os: ubuntu-latest + target: aarch64-unknown-linux-gnu + artifact_name: popcorn-cli + asset_name: popcorn-cli-linux-aarch64.tar.gz + compress_cmd: tar -czf + compress_ext: .tar.gz + steps: - uses: actions/checkout@v4 @@ -129,6 +136,7 @@ jobs: name: Release ${{ needs.version.outputs.new_tag }} files: | popcorn-cli-linux.tar.gz/popcorn-cli-linux.tar.gz + popcorn-cli-linux-aarch64.tar.gz/popcorn-cli-linux-aarch64.tar.gz popcorn-cli-windows.zip/popcorn-cli-windows.zip popcorn-cli-macos.tar.gz/popcorn-cli-macos.tar.gz env: diff --git a/install.sh b/install.sh index dc2d94f..e98b8e1 100755 --- a/install.sh +++ b/install.sh @@ -28,7 +28,12 @@ SYMLINK_NAME="" EXTENSION="" if [[ "$OSTYPE" == "linux-gnu"* ]]; then - OS="linux" + ARCH=$(uname -m) + if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then + OS="linux-aarch64" + else + OS="linux" + fi EXTENSION=".tar.gz" BINARY_NAME="popcorn-cli" SYMLINK_NAME="popcorn" @@ -47,7 +52,7 @@ else exit 1 fi -echo "✅ Detected OS: $OS" +echo "✅ Detected OS: $OS ($(uname -m))" # Download URL DOWNLOAD_URL="https://github.com/gpu-mode/popcorn-cli/releases/latest/download/popcorn-cli-${OS}${EXTENSION}" From 74bdbd740119ad1e1494291720c8854b9875f294 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 3 Apr 2026 22:18:44 -0700 Subject: [PATCH 2/5] validate arm64 installer in CI --- .github/workflows/arm64-smoke.yml | 62 +++++++++++++++++++++++++++++++ install.sh | 10 ++--- 2 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/arm64-smoke.yml diff --git a/.github/workflows/arm64-smoke.yml b/.github/workflows/arm64-smoke.yml new file mode 100644 index 0000000..448a731 --- /dev/null +++ b/.github/workflows/arm64-smoke.yml @@ -0,0 +1,62 @@ +name: ARM64 Smoke Test + +on: + pull_request: + branches: [main] + paths: + - ".github/workflows/**" + - ".cargo/**" + - "Cargo.toml" + - "Cargo.lock" + - "build.rs" + - "install.sh" + - "src/**" + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + arm64-linux: + name: Native ARM64 Linux Smoke Test + runs-on: ubuntu-24.04-arm + + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + with: + key: ubuntu-24.04-arm-smoke + + - name: Build ARM64 binary + run: cargo build --release + + - name: Package expected release asset + run: | + mkdir -p dist + cp target/release/popcorn-cli dist/popcorn-cli + chmod +x dist/popcorn-cli + tar -czf popcorn-cli-linux-aarch64.tar.gz -C dist popcorn-cli + + - name: Verify packaged binary runs + run: | + mkdir -p smoke + tar -xzf popcorn-cli-linux-aarch64.tar.gz -C smoke + ./smoke/popcorn-cli --version + + - name: Verify installer path on ARM64 + run: | + mkdir -p ci-home + HOME="$PWD/ci-home" \ + SHELL=/bin/bash \ + TEMP_DIR="$PWD/ci-tmp" \ + INSTALL_DIR="$PWD/ci-home/.local/bin" \ + DOWNLOAD_URL="file://$PWD/popcorn-cli-linux-aarch64.tar.gz" \ + bash ./install.sh + "$PWD/ci-home/.local/bin/popcorn" --version diff --git a/install.sh b/install.sh index e98b8e1..45be6b8 100755 --- a/install.sh +++ b/install.sh @@ -54,10 +54,10 @@ fi echo "✅ Detected OS: $OS ($(uname -m))" -# Download URL -DOWNLOAD_URL="https://github.com/gpu-mode/popcorn-cli/releases/latest/download/popcorn-cli-${OS}${EXTENSION}" -TEMP_DIR="/tmp/popcorn-cli-install" -INSTALL_DIR="$HOME/.local/bin" +# Allow overrides so CI can validate the installer against a locally built asset. +DOWNLOAD_URL="${DOWNLOAD_URL:-https://github.com/gpu-mode/popcorn-cli/releases/latest/download/popcorn-cli-${OS}${EXTENSION}}" +TEMP_DIR="${TEMP_DIR:-/tmp/popcorn-cli-install}" +INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}" # Create directories mkdir -p "$TEMP_DIR" @@ -154,4 +154,4 @@ echo " - ✅ All modes available: test, benchmark, leaderboard, profile" echo " - ✅ Clean user identification" echo "" echo "💡 Need help? Run: popcorn-cli --help" -echo "🔗 Example: popcorn-cli submit --gpu MI300 --leaderboard amd-fp8-mm --mode test example.py" \ No newline at end of file +echo "🔗 Example: popcorn-cli submit --gpu MI300 --leaderboard amd-fp8-mm --mode test example.py" From 4a51fab2b3d7d58f0f7bc0c5da929d2102d67675 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 3 Apr 2026 22:21:06 -0700 Subject: [PATCH 3/5] move arm64 validation into test workflow --- .github/workflows/arm64-smoke.yml | 62 ------------------------------- .github/workflows/test.yml | 22 +++++++++++ install.sh | 8 ++-- 3 files changed, 26 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/arm64-smoke.yml diff --git a/.github/workflows/arm64-smoke.yml b/.github/workflows/arm64-smoke.yml deleted file mode 100644 index 448a731..0000000 --- a/.github/workflows/arm64-smoke.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: ARM64 Smoke Test - -on: - pull_request: - branches: [main] - paths: - - ".github/workflows/**" - - ".cargo/**" - - "Cargo.toml" - - "Cargo.lock" - - "build.rs" - - "install.sh" - - "src/**" - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -jobs: - arm64-linux: - name: Native ARM64 Linux Smoke Test - runs-on: ubuntu-24.04-arm - - steps: - - uses: actions/checkout@v4 - - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - - name: Set up cargo cache - uses: Swatinem/rust-cache@v2 - with: - key: ubuntu-24.04-arm-smoke - - - name: Build ARM64 binary - run: cargo build --release - - - name: Package expected release asset - run: | - mkdir -p dist - cp target/release/popcorn-cli dist/popcorn-cli - chmod +x dist/popcorn-cli - tar -czf popcorn-cli-linux-aarch64.tar.gz -C dist popcorn-cli - - - name: Verify packaged binary runs - run: | - mkdir -p smoke - tar -xzf popcorn-cli-linux-aarch64.tar.gz -C smoke - ./smoke/popcorn-cli --version - - - name: Verify installer path on ARM64 - run: | - mkdir -p ci-home - HOME="$PWD/ci-home" \ - SHELL=/bin/bash \ - TEMP_DIR="$PWD/ci-tmp" \ - INSTALL_DIR="$PWD/ci-home/.local/bin" \ - DOWNLOAD_URL="file://$PWD/popcorn-cli-linux-aarch64.tar.gz" \ - bash ./install.sh - "$PWD/ci-home/.local/bin/popcorn" --version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7b1a74..5bb7926 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,28 @@ jobs: - name: Run tests run: cargo test --verbose + arm64-smoke: + name: ARM64 Build Smoke Test + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + with: + key: ubuntu-24.04-arm-test + + - name: Build + run: cargo build --release --verbose + + - name: Verify binary runs + run: ./target/release/popcorn-cli --version + coverage: name: Code Coverage runs-on: ubuntu-latest diff --git a/install.sh b/install.sh index 45be6b8..0d61d61 100755 --- a/install.sh +++ b/install.sh @@ -54,10 +54,10 @@ fi echo "✅ Detected OS: $OS ($(uname -m))" -# Allow overrides so CI can validate the installer against a locally built asset. -DOWNLOAD_URL="${DOWNLOAD_URL:-https://github.com/gpu-mode/popcorn-cli/releases/latest/download/popcorn-cli-${OS}${EXTENSION}}" -TEMP_DIR="${TEMP_DIR:-/tmp/popcorn-cli-install}" -INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}" +# Download URL +DOWNLOAD_URL="https://github.com/gpu-mode/popcorn-cli/releases/latest/download/popcorn-cli-${OS}${EXTENSION}" +TEMP_DIR="/tmp/popcorn-cli-install" +INSTALL_DIR="$HOME/.local/bin" # Create directories mkdir -p "$TEMP_DIR" From 2364fab75d2b9f933449c50724366a9cff780a7e Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 3 Apr 2026 22:24:15 -0700 Subject: [PATCH 4/5] fold arm64 into test matrix --- .github/workflows/test.yml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bb7926..be183c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] rust: [stable] steps: @@ -44,28 +44,6 @@ jobs: - name: Run tests run: cargo test --verbose - arm64-smoke: - name: ARM64 Build Smoke Test - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@v4 - - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - - name: Set up cargo cache - uses: Swatinem/rust-cache@v2 - with: - key: ubuntu-24.04-arm-test - - - name: Build - run: cargo build --release --verbose - - - name: Verify binary runs - run: ./target/release/popcorn-cli --version - coverage: name: Code Coverage runs-on: ubuntu-latest From 39884335b19a109ba3c8cdacc78febf261da350c Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Fri, 3 Apr 2026 22:27:06 -0700 Subject: [PATCH 5/5] build arm64 release on native runner --- .cargo/config.toml | 2 -- .github/workflows/build.yml | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 3c32d25..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34dc3af..f826332 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: compress_cmd: tar -czf compress_ext: .tar.gz - - os: ubuntu-latest + - os: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu artifact_name: popcorn-cli asset_name: popcorn-cli-linux-aarch64.tar.gz @@ -82,12 +82,6 @@ jobs: with: key: ${{ matrix.target }} - - name: Install cross-compilation dependencies (Linux ARM) - if: matrix.target == 'aarch64-unknown-linux-gnu' - run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu - - name: Install musl tools (Linux musl) if: matrix.target == 'x86_64-unknown-linux-musl' run: |