From a70fc36ef17a84cfc99fdcc986685a72fbe5015f Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 20:30:10 -0400 Subject: [PATCH 1/5] debug: enable run-built-image to investigate cross-compilation issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Temporarily enable run-built-image in CI to see what specific cross-compilation tools are missing in the ubuntu environment. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49033af..81ba722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: - run: make build - run: make test - run: make test-e2e - #- run: make run-built-image + - run: make run-built-image fmt: name: Rustfmt From 7d8093a4f8c43beae7ca1d13bf5bf91f8cd3cab3 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 20:43:03 -0400 Subject: [PATCH 2/5] fix: add dedicated integration job for cross-compilation tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Restore integration job with CI-compatible linker configuration - Use aarch64-linux-gnu-gcc instead of aarch64-linux-musl-gcc for CI - Enable make run-built-image test in dedicated ubuntu-latest environment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81ba722..4b8ab7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,33 @@ jobs: - run: make build - run: make test - run: make test-e2e + #- run: make run-built-image + + integration: + name: Integration Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # master + with: + toolchain: stable + targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl + - name: Install cross-compilation tools + run: | + sudo apt-get update + sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu + - name: Setup cargo config for CI cross-compilation + run: | + mkdir -p .cargo + cat > .cargo/config.toml << 'EOF' + [target.x86_64-unknown-linux-musl] + linker = "x86_64-linux-musl-gcc" + + [target.aarch64-unknown-linux-musl] + linker = "aarch64-linux-gnu-gcc" + EOF + - run: make verify-cross-compile + - run: make build - run: make run-built-image fmt: From 635f680dd5f180efb20a8676a9b23984e3262f64 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 20:47:20 -0400 Subject: [PATCH 3/5] fix: update CI cross-compilation config and remove local config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move cross-compilation setup to CI workflow for better portability - Remove local .cargo/config.toml to avoid conflicts - Add cross-compilation config directly in CI test matrix - Re-enable make run-built-image in main test job 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b8ab7a..3c92719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,25 +43,6 @@ jobs: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - run: make verify-cross-compile - - run: make build - - run: make test - - run: make test-e2e - #- run: make run-built-image - - integration: - name: Integration Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # master - with: - toolchain: stable - targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl - - name: Install cross-compilation tools - run: | - sudo apt-get update - sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu - name: Setup cargo config for CI cross-compilation run: | mkdir -p .cargo @@ -72,8 +53,11 @@ jobs: [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-gnu-gcc" EOF + - run: make verify-cross-compile - run: make build + - run: make test + - run: make test-e2e - run: make run-built-image fmt: From c678342a5b934bf00de0d77b7cd22ca63bd52565 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 20:53:53 -0400 Subject: [PATCH 4/5] fix: use correct musl linker name in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change from x86_64-linux-musl-gcc to musl-gcc (provided by musl-tools package) - Keep aarch64-linux-gnu-gcc for ARM64 cross-compilation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c92719..a81134e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: mkdir -p .cargo cat > .cargo/config.toml << 'EOF' [target.x86_64-unknown-linux-musl] - linker = "x86_64-linux-musl-gcc" + linker = "musl-gcc" [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-gnu-gcc" From 05a1a1915ff21d88b79a1d7576d46e68d6ec0ad5 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 20:58:43 -0400 Subject: [PATCH 5/5] fix: restrict cross-compilation test to x86_64 runners only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Only run make run-built-image on ubuntu-latest (x86_64) runners - ARM64 runners cannot cross-compile for x86_64 due to linker architecture mismatch - Prevents 'file in wrong format' errors when ARM64 musl-gcc tries to link x86_64 objects 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a81134e..e46c921 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,10 @@ jobs: - run: make build - run: make test - run: make test-e2e - - run: make run-built-image + # Only run cross-compilation integration test on x86_64 runners + - name: Run integration test (cross-compilation) + if: matrix.os == 'ubuntu-latest' + run: make run-built-image fmt: name: Rustfmt