Fix macOS PKG installation for Unity 6000+ (cpio payload support) (#451) #453
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CRATE_NAME: uvm | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Native builds | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| use-zigbuild: false | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| use-zigbuild: false | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-latest | |
| use-zigbuild: false | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| use-zigbuild: false | |
| - 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 | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Zig | |
| if: matrix.use-zigbuild | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.11.0 | |
| - name: Install zigbuild | |
| if: matrix.use-zigbuild | |
| run: cargo install cargo-zigbuild | |
| - name: Cache cargo registry | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ matrix.target }}- | |
| ${{ runner.os }}-cargo- | |
| - name: Build | |
| run: | | |
| if [ "${{ matrix.use-zigbuild }}" = "true" ]; then | |
| cargo zigbuild --target ${{ matrix.target }} --verbose --release | |
| else | |
| cargo build --target ${{ matrix.target }} --verbose --release | |
| fi | |
| shell: bash | |
| - name: Run tests | |
| # 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 (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 |