diff --git a/.github/workflows/rust-target.yml b/.github/workflows/rust-target.yml index cd5fd9fbe5..d77d017f81 100644 --- a/.github/workflows/rust-target.yml +++ b/.github/workflows/rust-target.yml @@ -13,6 +13,7 @@ on: jobs: define-matrix: + name: Define matrix runs-on: ubuntu-latest outputs: setup: ${{ steps.define-setup.outputs.setup }} @@ -26,7 +27,8 @@ jobs: setup=$(python ci/set_versions.py) echo "setup=$setup" >> $GITHUB_OUTPUT - test: + check-target: + name: Testing target ${{matrix.setup.rust-version}} runs-on: ubuntu-latest needs: [define-matrix] strategy: @@ -39,7 +41,7 @@ jobs: - name: Install rust uses: dtolnay/rust-toolchain@master with: - toolchain: ${{matrix.rust-version}} + toolchain: ${{matrix.setup.rust-version}} - name: Install packages run: | @@ -48,7 +50,7 @@ jobs: - name: Check headers run: | - TARGET_VERSIONS=$(echo '${{matrix.target-versions}}' | jq ".[]" | tr -d '"') + TARGET_VERSIONS=$(echo '${{ toJSON(matrix.setup.target-versions) }}' | jq ".[]" | tr -d '"') for TARGET_VERSION in $TARGET_VERSIONS; do echo "Running checks for target version $TARGET_VERSION" HEADERS=$(rg -l '\-\-rust-target[\s=]$TARGET_VERSION' bindgen-tests/tests/headers/ | cut -d '/' -f 4 | cut -d '.' -f 1) @@ -56,6 +58,6 @@ jobs: for HEADER in $HEADERS; do FILE="bindgen-tests/tests/expectations/tests/$HEADER.rs" echo "Checking $FILE" - rustup run ${{matrix.rust-version}} rustc --edition=2018 --crate-type=rlib --emit=metadata $FILE + rustup run ${{matrix.setup.rust-version}} rustc --edition=2018 --crate-type=rlib --emit=metadata $FILE done done