Skip to content

Commit

Permalink
ci: Remove llvm 5, introduce llvm 16
Browse files Browse the repository at this point in the history
LLVM 5 is ancient.
  • Loading branch information
emilio committed Jan 15, 2024
1 parent b82746d commit 9c59ac9
Show file tree
Hide file tree
Showing 60 changed files with 673 additions and 2,825 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
- debian: null
cross: null
rust: null
llvm_version: ["5.0", "9.0"]
llvm_version: ["9.0", "16.0"]
main_tests: [1]
release_build: [0, 1]
no_default_features: [0, 1]
Expand All @@ -155,7 +155,7 @@ jobs:
# Test with extra asserts + docs just with latest llvm versions to
# prevent explosion
- os: ubuntu-latest
llvm_version: "9.0"
llvm_version: "16.0"
release_build: 0
no_default_features: 0
feature_extra_asserts: 1
Expand All @@ -169,17 +169,20 @@ jobs:
# debian: arm64
# cross: aarch64-linux-gnu
# rust: aarch64-unknown-linux-gnu
# llvm_version: "9.0"
# llvm_version: "16.0"
# main_tests: 0
# release_build: 0
# feature_extra_asserts: 0

# Ensure stuff works on macos too
- os: macos-latest
llvm_version: "9.0"
release_build: 0
no_default_features: 0
feature_extra_asserts: 0
# Disabled for now because llvm doesn't provide releases for x86-64
# macOS which is what the runner uses.
#
# - os: macos-latest
# llvm_version: "16.0"
# release_build: 0
# no_default_features: 0
# feature_extra_asserts: 0
steps:
- uses: actions/checkout@v3

Expand Down
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ can add multiple test expectations, one for each supported `libclang`
version. Instead of having a single `bindgen-tests/tests/expectations/tests/my_test.rs` file,
add each of:

* `bindgen-tests/tests/expectations/tests/libclang-16/my_test.rs`
* `bindgen-tests/tests/expectations/tests/libclang-9/my_test.rs`
* `bindgen-tests/tests/expectations/tests/libclang-5/my_test.rs`

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

Where `$VERSION` is one of:

* `4`
* `3_9`
* `3_8`

depending on which version of `libclang` you have installed.

### Integration Tests
Expand Down
12 changes: 6 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ environment:
RUST_BACKTRACE: 1
RUST_CHANNEL: "%Configuration%"
matrix:
- TARGET: gnu
LLVM_VERSION: 5.0.0-1
BINDGEN_FEATURES: __testing_only_libclang_5
- TARGET: gnu
LLVM_VERSION: 9.0.0-1
BINDGEN_FEATURES: __testing_only_libclang_9
- TARGET: msvc
LLVM_VERSION: 5.0.0
BINDGEN_FEATURES: __testing_only_libclang_5
- TARGET: gnu
LLVM_VERSION: 16.0.4
BINDGEN_FEATURES: __testing_only_libclang_16
- TARGET: msvc
LLVM_VERSION: 9.0.0
BINDGEN_FEATURES: __testing_only_libclang_9
- TARGET: msvc
LLVM_VERSION: 16.0.4
BINDGEN_FEATURES: __testing_only_libclang_16

configuration:
- stable
Expand Down
2 changes: 1 addition & 1 deletion bindgen-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ which-rustfmt = ["bindgen/which-rustfmt"]
# Features used for CI testing
__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]

[package.metadata.release]
release = true
Expand Down
6 changes: 3 additions & 3 deletions bindgen-cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ use crate::options::builder_from_flags;
#[cfg(feature = "logging")]
fn clang_version_check() {
let version = bindgen::clang_version();
let expected_version = if cfg!(feature = "__testing_only_libclang_9") {
let expected_version = if cfg!(feature = "__testing_only_libclang_16") {
Some((16, 0))
} else if cfg!(feature = "__testing_only_libclang_9") {
Some((9, 0))
} else if cfg!(feature = "__testing_only_libclang_5") {
Some((5, 0))
} else {
None
};
Expand Down
2 changes: 1 addition & 1 deletion bindgen-integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ runtime = ["bindgen/runtime"]

__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
2 changes: 1 addition & 1 deletion bindgen-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ which-rustfmt = ["bindgen/which-rustfmt"]

__testing_only_extra_assertions = ["bindgen/__testing_only_extra_assertions"]
__testing_only_libclang_9 = ["bindgen/__testing_only_libclang_9"]
__testing_only_libclang_5 = ["bindgen/__testing_only_libclang_5"]
__testing_only_libclang_16 = ["bindgen/__testing_only_libclang_16"]
2 changes: 1 addition & 1 deletion bindgen-tests/tests/expectations/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fs;
use std::io::Write;
use std::path::Path;

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

fn main() {
println!("cargo:rerun-if-changed=build.rs");
Expand Down
158 changes: 158 additions & 0 deletions bindgen-tests/tests/expectations/tests/class.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c59ac9

Please sign in to comment.