Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Nov 22, 2024
1 parent c0d3b18 commit 586f66c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/rust-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
define-matrix:
name: Define matrix
runs-on: ubuntu-latest
outputs:
setup: ${{ steps.define-setup.outputs.setup }}
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -48,14 +50,14 @@ 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)
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

0 comments on commit 586f66c

Please sign in to comment.