Skip to content

Commit 9c59ac9

Browse files
committed
ci: Remove llvm 5, introduce llvm 16
LLVM 5 is ancient.
1 parent b82746d commit 9c59ac9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+673
-2825
lines changed

.github/workflows/bindgen.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
- debian: null
143143
cross: null
144144
rust: null
145-
llvm_version: ["5.0", "9.0"]
145+
llvm_version: ["9.0", "16.0"]
146146
main_tests: [1]
147147
release_build: [0, 1]
148148
no_default_features: [0, 1]
@@ -155,7 +155,7 @@ jobs:
155155
# Test with extra asserts + docs just with latest llvm versions to
156156
# prevent explosion
157157
- os: ubuntu-latest
158-
llvm_version: "9.0"
158+
llvm_version: "16.0"
159159
release_build: 0
160160
no_default_features: 0
161161
feature_extra_asserts: 1
@@ -169,17 +169,20 @@ jobs:
169169
# debian: arm64
170170
# cross: aarch64-linux-gnu
171171
# rust: aarch64-unknown-linux-gnu
172-
# llvm_version: "9.0"
172+
# llvm_version: "16.0"
173173
# main_tests: 0
174174
# release_build: 0
175175
# feature_extra_asserts: 0
176176

177177
# Ensure stuff works on macos too
178-
- os: macos-latest
179-
llvm_version: "9.0"
180-
release_build: 0
181-
no_default_features: 0
182-
feature_extra_asserts: 0
178+
# Disabled for now because llvm doesn't provide releases for x86-64
179+
# macOS which is what the runner uses.
180+
#
181+
# - os: macos-latest
182+
# llvm_version: "16.0"
183+
# release_build: 0
184+
# no_default_features: 0
185+
# feature_extra_asserts: 0
183186
steps:
184187
- uses: actions/checkout@v3
185188

CONTRIBUTING.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ can add multiple test expectations, one for each supported `libclang`
208208
version. Instead of having a single `bindgen-tests/tests/expectations/tests/my_test.rs` file,
209209
add each of:
210210

211+
* `bindgen-tests/tests/expectations/tests/libclang-16/my_test.rs`
211212
* `bindgen-tests/tests/expectations/tests/libclang-9/my_test.rs`
212-
* `bindgen-tests/tests/expectations/tests/libclang-5/my_test.rs`
213213

214214
If you need to update the test expectations for a test file that generates
215215
different bindings for different `libclang` versions, you *don't* need to have
@@ -226,12 +226,6 @@ to check the bindings against with a cargo feature:
226226
$ cargo test --features __testing_only_libclang_$VERSION
227227
```
228228

229-
Where `$VERSION` is one of:
230-
231-
* `4`
232-
* `3_9`
233-
* `3_8`
234-
235229
depending on which version of `libclang` you have installed.
236230

237231
### Integration Tests

appveyor.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ environment:
22
RUST_BACKTRACE: 1
33
RUST_CHANNEL: "%Configuration%"
44
matrix:
5-
- TARGET: gnu
6-
LLVM_VERSION: 5.0.0-1
7-
BINDGEN_FEATURES: __testing_only_libclang_5
85
- TARGET: gnu
96
LLVM_VERSION: 9.0.0-1
107
BINDGEN_FEATURES: __testing_only_libclang_9
11-
- TARGET: msvc
12-
LLVM_VERSION: 5.0.0
13-
BINDGEN_FEATURES: __testing_only_libclang_5
8+
- TARGET: gnu
9+
LLVM_VERSION: 16.0.4
10+
BINDGEN_FEATURES: __testing_only_libclang_16
1411
- TARGET: msvc
1512
LLVM_VERSION: 9.0.0
1613
BINDGEN_FEATURES: __testing_only_libclang_9
14+
- TARGET: msvc
15+
LLVM_VERSION: 16.0.4
16+
BINDGEN_FEATURES: __testing_only_libclang_16
1717

1818
configuration:
1919
- stable

bindgen-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ which-rustfmt = ["bindgen/which-rustfmt"]
4040
# Features used for CI testing
4141
__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
4242
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
43-
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
43+
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
4444

4545
[package.metadata.release]
4646
release = true

bindgen-cli/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use crate::options::builder_from_flags;
1313
#[cfg(feature = "logging")]
1414
fn clang_version_check() {
1515
let version = bindgen::clang_version();
16-
let expected_version = if cfg!(feature = "__testing_only_libclang_9") {
16+
let expected_version = if cfg!(feature = "__testing_only_libclang_16") {
17+
Some((16, 0))
18+
} else if cfg!(feature = "__testing_only_libclang_9") {
1719
Some((9, 0))
18-
} else if cfg!(feature = "__testing_only_libclang_5") {
19-
Some((5, 0))
2020
} else {
2121
None
2222
};

bindgen-integration/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ runtime = ["bindgen/runtime"]
1616

1717
__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
1818
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
19-
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
19+
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]

bindgen-tests/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ which-rustfmt = ["bindgen/which-rustfmt"]
2323

2424
__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
2525
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
26-
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
26+
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]

bindgen-tests/tests/expectations/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::fs;
88
use std::io::Write;
99
use std::path::Path;
1010

11-
const LIBCLANG_VERSION_DIRS: &[&str] = &["libclang-5", "libclang-9"];
11+
const LIBCLANG_VERSION_DIRS: &[&str] = &["libclang-9"];
1212

1313
fn main() {
1414
println!("cargo:rerun-if-changed=build.rs");

bindgen-tests/tests/expectations/tests/class.rs

+158
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)