diff --git a/.gitea/workflows/ci-reusable.yml b/.gitea/workflows/ci-reusable.yml index 2cf6df3..8b2b8b9 100644 --- a/.gitea/workflows/ci-reusable.yml +++ b/.gitea/workflows/ci-reusable.yml @@ -26,13 +26,23 @@ jobs: components: clippy, rustfmt targets: ${{ inputs.target }} + - name: Install cross-compilation tools (x86_64 on ARM64) + if: runner.os == 'Linux' && runner.arch == 'ARM64' && inputs.target == 'x86_64-unknown-linux-gnu' + run: | + sudo apt-get update + sudo apt-get install -y gcc-x86-64-linux-gnu + + - name: Configure cross-compilation (x86_64 on ARM64) + if: runner.os == 'Linux' && runner.arch == 'ARM64' && inputs.target == 'x86_64-unknown-linux-gnu' + run: | + echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc" >> $GITHUB_ENV - name: Build run: | ${{ inputs.target && format('cargo build --all-features --target {0}', inputs.target) || 'cargo build --all-features' }} - name: Test - if: inputs.target == '' || (runner.os == 'Linux' && inputs.target == 'x86_64-unknown-linux-gnu') || (runner.os == 'macOS' && ((runner.arch == 'ARM64' && inputs.target == 'aarch64-apple-darwin') || (runner.arch == 'X64' && inputs.target == 'x86_64-apple-darwin'))) || (runner.os == 'Windows' && inputs.target == 'x86_64-pc-windows-msvc') + if: inputs.target == '' || (runner.os == 'Linux' && inputs.target == 'x86_64-unknown-linux-gnu') || (runner.os == 'Windows' && inputs.target == 'x86_64-pc-windows-msvc') run: | ${{ inputs.target && format('cargo test --all-features --target {0}', inputs.target) || 'cargo test --all-features' }} diff --git a/.gitea/workflows/multi-platform.yml b/.gitea/workflows/multi-platform.yml index 7526ac6..70eb84d 100644 --- a/.gitea/workflows/multi-platform.yml +++ b/.gitea/workflows/multi-platform.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: include: - # Linux native targets only + # Linux x86_64 target (may cross-compile on ARM runners) - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu