Skip to content

Commit d57c547

Browse files
committed
Add workflow
1 parent 713dbda commit d57c547

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/rust-target.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
fail-fast: false
19+
matrix:
20+
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"]
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install rust
25+
uses: dtolnay/rust-toolchain@master
26+
with:
27+
toolchain: ${{matrix.rust-version}}
28+
29+
- name: Install packages
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install libtinfo5 ripgrep
33+
34+
- name: Check headers
35+
run: |
36+
HEADERS=$(rg -l '\-\-rust-target[\s=]${{matrix.rust-version}}' bindgen-tests/tests/headers/ | cut -d '/' -f 4 | cut -d '.' -f 1)
37+
38+
for HEADER in $HEADERS; do
39+
FILE="bindgen-tests/tests/expectations/tests/$HEADER.rs"
40+
rustup run ${{matrix.rust-version}} rustc --edition=2018 --crate-type=rlib --emit=metadata $FILE
41+
done
42+

0 commit comments

Comments
 (0)