Refactor Rust CI workflow configuration #86
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: Cross-Platform CI | |
| on: | |
| push: | |
| branches: [trunk, main, 'v*.x', 'ci/*'] | |
| pull_request: | |
| branches: [trunk, main, 'v*.x'] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test-cross-std: | |
| name: Cross-platform std (${{ matrix.platform }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - aarch64-unknown-linux-gnu | |
| - aarch64-unknown-linux-musl | |
| - riscv64gc-unknown-linux-gnu | |
| - x86_64-unknown-linux-musl | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@cross | |
| - name: cross test | |
| run: cross test --target ${{ matrix.platform }} --all-features | |
| env: | |
| RUST_BACKTRACE: 1 | |
| CROSS_CUSTOM_DOCKER_INSTALL_STEPS: apt-get update && apt-get install -y gcc-multilib g++-multilib |