Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Nov 22, 2024
1 parent 713dbda commit f4e703e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/rust-target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: rust-target

on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["1.33", "1.36", "1.40", "1.43", "1.47", "1.59", "1.64", "1.68", "1.71", "1.73", "1.77", "nightly"]
steps:
- uses: actions/checkout@v4

- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust-version}}

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install libtinfo5 ripgrep
- name: Check headers
run: |
HEADERS=$(rg -l '\-\-rust-target[\s=]${{matrix.rust-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"
rustup run ${{matrix.rust-version}} rustc --emit=metadata $FILE
done

0 comments on commit f4e703e

Please sign in to comment.