Skip to content

Commit 7dc57c1

Browse files
committed
Add workflow
1 parent 713dbda commit 7dc57c1

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/rust-target.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: rust-target
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
merge_group:
11+
branches:
12+
- main
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
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"]
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install rust
24+
uses: dtolnay/rust-toolchain@master
25+
with:
26+
toolchain: ${{matrix.rust-version}}
27+
28+
- name: Install packages
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install libtinfo5 ripgrep
32+
33+
- name: Check headers
34+
run: |
35+
HEADERS=$(rg -l '\-\-rust-target[\s=]${{matrix.rust-version}}' bindgen-tests/tests/headers/ | cut -d '/' -f 4 | cut -d '.' -f 1)
36+
37+
for HEADER in $HEADERS; do
38+
FILE="bindgen-tests/tests/expectations/tests/$HEADER.rs"
39+
rustup run ${{matrix.rust-version}} rustc --edition=2021 --crate-type=rlib --emit=metadata $FILE
40+
done
41+

0 commit comments

Comments
 (0)