diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f589e230..62559d3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,13 +106,21 @@ jobs: ### Linux ```bash - # GNU (most distributions) + # GNU (most distributions) - x86_64 curl -L -o uvm https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/uvm-x86_64-unknown-linux-gnu chmod +x uvm - # Musl (Alpine, static binary) + # GNU (most distributions) - ARM64 + curl -L -o uvm https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/uvm-aarch64-unknown-linux-gnu + chmod +x uvm + + # Musl (Alpine, static binary) - x86_64 curl -L -o uvm https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/uvm-x86_64-unknown-linux-musl chmod +x uvm + + # Musl (Alpine, static binary) - ARM64 + curl -L -o uvm https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/uvm-aarch64-unknown-linux-musl + chmod +x uvm ``` ### Windows @@ -150,15 +158,21 @@ jobs: os: windows-latest use-zigbuild: false - # Linux GNU target (native) + # Linux GNU targets - target: x86_64-unknown-linux-gnu os: ubuntu-latest use-zigbuild: false + - target: aarch64-unknown-linux-gnu + os: ubuntu-24.04-arm + use-zigbuild: false - # Linux musl target (cross-compile with zigbuild) + # Linux musl targets (cross-compile with zigbuild) - target: x86_64-unknown-linux-musl os: ubuntu-latest use-zigbuild: true + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm + use-zigbuild: true steps: - name: Checkout code diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4706df27..f95c3f41 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,10 +34,18 @@ jobs: - target: aarch64-apple-darwin os: macos-latest use-zigbuild: false + # Linux ARM64 glibc (native on ARM runners) + - target: aarch64-unknown-linux-gnu + os: ubuntu-24.04-arm + use-zigbuild: false # Cross-compile with zigbuild - target: x86_64-unknown-linux-musl os: ubuntu-latest use-zigbuild: true + # Linux ARM64 musl (native on ARM runners) + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm + use-zigbuild: true steps: - name: Checkout code @@ -80,11 +88,11 @@ jobs: shell: bash - name: Run tests - # Skip tests for cross-compiled targets and Windows ARM64 (cross-compiled) - if: matrix.use-zigbuild == false && matrix.target != 'aarch64-pc-windows-msvc' + # Skip tests for cross-compiled targets (zigbuild, Windows ARM64, Linux ARM64) + if: matrix.use-zigbuild == false && matrix.target != 'aarch64-pc-windows-msvc' && matrix.target != 'aarch64-unknown-linux-gnu' run: cargo test --target ${{ matrix.target }} --verbose --release - name: Run UVM help - # Skip help test for cross-compiled targets and Windows ARM64 (cross-compiled) - if: matrix.use-zigbuild == false && matrix.target != 'aarch64-pc-windows-msvc' + # Skip help test for cross-compiled targets (zigbuild, Windows ARM64, Linux ARM64) + if: matrix.use-zigbuild == false && matrix.target != 'aarch64-pc-windows-msvc' && matrix.target != 'aarch64-unknown-linux-gnu' run: cargo run --target ${{ matrix.target }} --bin uvm --release -- --help diff --git a/uvm_live_platform/src/model/platform.rs b/uvm_live_platform/src/model/platform.rs index 88edbf24..4329b1f9 100644 --- a/uvm_live_platform/src/model/platform.rs +++ b/uvm_live_platform/src/model/platform.rs @@ -12,7 +12,10 @@ pub enum UnityReleaseDownloadArchitecture { impl Default for UnityReleaseDownloadArchitecture { fn default() -> Self { - if cfg!(target_arch = "x86_64") { + // On Linux, always use x86_64 regardless of the actual architecture + if cfg!(target_os = "linux") { + Self::X86_64 + } else if cfg!(target_arch = "x86_64") { Self::X86_64 } else if cfg!(target_arch = "aarch64") { Self::Arm64