Skip to content

chore: Set up a proper job matrix for rust-cross #19533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,16 @@ jobs:
name: Rust Cross
runs-on: ubuntu-latest

strategy:
matrix:
target: [powerpc-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-unknown]
include:
# The rust-analyzer binary is not expected to compile on WASM, but the IDE
# crate should
- target: wasm32-unknown-unknown
ide-only: true
env:
targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
# The rust-analyzer binary is not expected to compile on WASM, but the IDE
# crate should
targets_ide: "wasm32-unknown-unknown"
RUSTFLAGS: "-D warnings"
RUSTFLAGS: "-Dwarnings"

steps:
- name: Checkout repository
Expand All @@ -202,19 +206,15 @@ jobs:
- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup target add ${{ env.targets }} ${{ env.targets_ide }}
rustup target add ${{ matrix.target }}

# - name: Cache Dependencies
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Check
run: |
for target in ${{ env.targets }}; do
cargo check --target=$target --all-targets
done
for target in ${{ env.targets_ide }}; do
cargo check -p ide --target=$target --all-targets
done
- run: cargo check --target=${{ matrix.target }} --all-targets -p ide
if: ${{ matrix.ide-only }}
- run: cargo check --target=${{ matrix.target }} --all-targets
if: ${{ !matrix.ide-only }}

typescript:
needs: changes
Expand Down