cpubits v0.1.0 (#1444) #109
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: cpubits | |
| on: | |
| pull_request: | |
| paths: | |
| - "cpubits/**" | |
| - "Cargo.*" | |
| push: | |
| branches: master | |
| defaults: | |
| run: | |
| working-directory: cpubits | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| include: | |
| # `aarch64` Linux | |
| - target: aarch64-unknown-linux-gnu | |
| rust: 1.85.0 # MSRV | |
| runner: ubuntu-24.04-arm | |
| - target: aarch64-unknown-linux-gnu | |
| rust: stable | |
| runner: ubuntu-24.04-arm | |
| # `aarch64` macOS | |
| - target: aarch64-apple-darwin | |
| rust: 1.85.0 # MSRV | |
| runner: macos-latest | |
| - target: aarch64-apple-darwin | |
| rust: stable | |
| runner: macos-latest | |
| # `x86` Linux (32-bit) | |
| - target: i686-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| rust: 1.85.0 # MSRV | |
| deps: sudo apt update && sudo apt install gcc-multilib | |
| # `x86_64` Linux | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| rust: 1.85.0 # MSRV | |
| # `x86_64` Windows | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-latest | |
| rust: 1.85.0 # MSRV | |
| runs-on: ${{ matrix.runner != '' && matrix.runner || 'ubuntu-latest' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: RustCrypto/actions/cargo-cache@master | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| targets: ${{ matrix.target }} | |
| - run: ${{ matrix.deps }} | |
| - run: cargo test --target ${{ matrix.target }} | |
| # Test on foreign architectures using `cross test` | |
| test-cross: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: armv7-unknown-linux-gnueabi # ARM32 | |
| - target: powerpc-unknown-linux-gnu # PPC32 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.target }} | |
| - run: cargo install cross | |
| - run: cross test --target ${{ matrix.target }} | |
| # Test WASM using `wasm32-wasip1` target on `wasmtime` | |
| test-wasm: | |
| strategy: | |
| matrix: | |
| rust: | |
| - 1.85 # MSRV | |
| - stable | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| targets: wasm32-wasip1 | |
| - run: cargo test --target wasm32-wasip1 | |
| # Test `cpubits="32"` on a 64-bit target | |
| test-override-32-on-64: | |
| env: | |
| RUSTFLAGS: '-Dwarnings --cfg cpubits="32"' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: RustCrypto/actions/cargo-cache@master | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - run: cargo test |