Use matrix for `cargo check` by ShaharNaveh · Pull Request #7388 · RustPython/RustPython
| include: | |
| - os: ubuntu-latest | |
| targets: | |
| - aarch64-linux-android | |
| - i686-unknown-linux-gnu | |
| - i686-unknown-linux-musl | |
| - wasm32-wasip2 | |
| - x86_64-unknown-freebsd | |
| dependencies: | |
| gcc-multilib: true | |
| musl-tools: true | |
| - os: ubuntu-latest | |
| targets: | |
| - aarch64-unknown-linux-gnu | |
| dependencies: | |
| gcc-aarch64-linux-gnu: true # conflict with `gcc-multilib` | |
| - os: macos-latest | |
| targets: | |
| - aarch64-apple-ios | |
| - x86_64-apple-darwin | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| target: i686-unknown-linux-gnu | |
| persist-credentials: false | |
| - name: Install gcc-multilib and musl-tools | |
| uses: ./.github/actions/install-linux-deps | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| gcc-multilib: true | |
| musl-tools: true | |
| prefix-key: v0-rust-${{ join(matrix.targets, '-') }} | |
| - name: Check compilation for x86 32bit | |
| run: cargo check --target i686-unknown-linux-gnu ${{ env.CARGO_ARGS_NO_SSL }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-linux-deps | |
| with: ${{ matrix.dependencies || fromJSON('{}') }} | |
| include: | |
| - os: ubuntu-latest | |
| targets: | |
| - aarch64-linux-android | |
| - i686-unknown-linux-gnu | |
| - i686-unknown-linux-musl | |
| - wasm32-wasip2 | |
| - x86_64-unknown-freebsd | |
| gcc_multilib: true | |
| musl_tools: true | |
| - os: ubuntu-latest | |
| targets: | |
| - aarch64-unknown-linux-gnu | |
| gcc_aarch64_linux_gnu: true # conflict with `gcc-multilib` | |
| - os: macos-latest | |
| targets: | |
| - aarch64-apple-ios | |
| - x86_64-apple-darwin | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: v0-rust-${{ join(matrix.targets, '-') }} | |
| - name: Install dependencies | |
| if: runner.os == 'Linux' | |
| uses: ./.github/actions/install-linux-deps | |
| with: | |
| gcc-multilib: ${{ matrix.gcc_multilib || false }} | |
| musl-tools: ${{ matrix.musl_tools || false }} | |
| clang: ${{ matrix.clang || false }} | |
| gcc-aarch64-linux-gnu: ${{ matrix.gcc_aarch64_linux_gnu || false }} |