name: Rust on: push: branches: [ "main" ] pull_request: branches: [ "main" ] env: CARGO_TERM_COLOR: always jobs: test: name: Test on ${{ matrix.target }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: target: - x86_64-unknown-linux-gnu - aarch64-unknown-linux-gnu - riscv64gc-unknown-linux-gnu steps: - name: "Checkout" uses: actions/checkout@v6 - name: "Setup Rust toolchain" uses: actions-rust-lang/setup-rust-toolchain@v1 with: target: ${{ matrix.target }} - name: "Make Mold the default linker" uses: rui314/setup-mold@v1 - name: "Install cross" run: cargo install cross --git https://github.com/cross-rs/cross - name: "Build" run: cross build --verbose --target ${{ matrix.target }} - name: "Run tests" if: matrix.target == 'x86_64-unknown-linux-gnu' run: cross test --verbose --target ${{ matrix.target }}