53 Commits

Author SHA1 Message Date
a30054014 8632bc0007 rust-bindgen相关依赖兼容性适配
Signed-off-by: a30054014 <aipeng3@huawei.com>
2025-04-19 16:11:11 +08:00
oh_ci 7a48a485b4 回退 'Pull Request !9 : bindgen升级0.70.1版本' 2025-04-19 06:22:12 +00:00
月出皎兮 01c87a7bae bindgen升级0.70.1版本
Signed-off-by: 月出皎兮 <xietingwei@h-partners.com>
2025-04-15 20:47:01 +08:00
Christian Poveda 0296f9e86c split the repo into a workspace
remove `clap` dependency 🎉

update the book installation instructions
2022-10-04 20:47:17 -05:00
Saleem Rashid b1c4178826 Run tests on AArch64 using Debian multiarch and QEMU 2021-02-08 13:29:31 +01:00
Saleem Rashid 704c02b579 Revert "Run tests on AArch64"
This reverts commit 0f8ceb68fd.
2021-02-08 13:29:31 +01:00
Corey Farwell 0f8ceb68fd Run tests on AArch64 2021-02-04 16:46:38 +01:00
Emilio Cobos Álvarez faf8b3edba ci: Move the remaining CI tasks (updating the book) to GitHub actions. 2020-12-26 20:46:42 +01:00
Emilio Cobos Álvarez fde75f68e7 ci: Switch most CI to GitHub actions. 2020-12-26 19:01:53 +01:00
Kyle Mayes c15355306c Bump MSRV to 1.40.0
The libloading crate is used for runtime linking
and since 0.6.0 it has a MSRV of 1.40.0
2020-08-18 02:39:06 +02:00
Darren Kulp 1f1766de43 ci: Remove extraneous variable declaration 2020-08-03 17:57:55 +02:00
Darren Kulp 5a638c0a11 ci: Explicitly select Ubuntu 16.04 (xenial)
Xenial was being used anyway, but it is wise to be explicit. This lets
us download a newer precompiled LLVM, too.
2020-08-03 17:57:55 +02:00
Darren Kulp ed3ae0fcf6 ci: Remove overrides for unsupported LLVM versions 2020-08-03 17:57:55 +02:00
Darren Kulp 5678a142bc ci: Use llvm-5.0.1 to simplify target triple 2020-08-03 17:57:55 +02:00
Darren Kulp 5e7f2e9b11 Refactor before_install script
Remove needless pushd that was causing trouble with `set -e`

Remove old osx workaround for rvm

Add shebang line

Fix target descriptor

Support LLVM versions 9.0.1+
2020-07-27 12:31:17 +02:00
Emilio Cobos Álvarez 0de049e153 ci: always try to find a nightly toolchain with rustfmt. 2020-06-15 02:13:39 +02:00
Denis Lisov c11b780fcb Readme/CI: mention and test the MSRV
Write down the minimal supported Rust version in the README.md and add a
CI test that ensures MSRV bumps cannot happen accidentally.
2020-04-26 18:56:23 +02:00
Luca Barbato 880de82108 Move warnings check on the CI
Always building with `deny(warnings)` leads to messups such as
https://docs.rs/crate/bindgen/0.52.0/builds/199624
2019-11-25 17:35:45 +01:00
Emilio Cobos Álvarez c462b63ec4 Test the runtime feature and the non-static linking.
We can't test the "static" code-path, since there are no prebuilt binaries in
releases.llvm.org.
2019-10-21 23:06:10 +02:00
Emilio Cobos Álvarez 5324c3e4aa Enforce rustfmt on automation. 2019-10-14 14:15:46 +02:00
Emilio Cobos Álvarez cd4f0043fb Add llvm 9.0 to CI. 2019-10-14 14:15:46 +02:00
Emilio Cobos Álvarez dd21b210dd Improve the script to enforce rustfmt on automation. 2019-09-17 11:53:23 +09:00
Ryan Lopopolo 3062841c20 Add rustfmt to nightly toolchain 2019-09-17 09:35:52 +09:00
Ryan Lopopolo 4c379f512a Set RUSTFMT for nofeatures tests 2019-09-17 09:35:52 +09:00
Ryan Lopopolo f377a637fb lint ci/script.sh 2019-09-17 09:35:52 +09:00
Ryan Lopopolo 7ed4df1ff7 Test bindgen with no default features 2019-09-17 09:35:52 +09:00
Emilio Cobos Álvarez 0891848b09 Fix rustfmt installation to be via rustup. 2019-07-26 17:10:11 +02:00
Alex Touchet 11186b7b5f Update Links 2019-05-21 13:41:42 +02:00
Emilio Cobos Álvarez 8d19756a10 Update mdbook. 2018-09-08 02:29:38 +02:00
Emilio Cobos Álvarez de0d850dac Add -x to the CI script. 2018-04-03 11:27:56 +02:00
Emilio Cobos Álvarez a5eb2df08e Use clang 4.0.0, not 4.0.1, since the later doesn't have an ubuntu package. 2018-04-03 11:27:47 +02:00
Emilio Cobos Álvarez 21ff022970 ci: Update before_install to handle target change in LLVM's server.
Straight from:

  https://raw.githubusercontent.com/KyleMayes/clang-sys/master/ci/before_install.sh
2018-04-03 11:27:46 +02:00
Shea Newton 2c776522ae quickchecking CI tests
The changes reflected in this PR include the logic to test the
`quickcheking` crate itself. Rather that just validate that the
`quickchecking` crate builds in CI with `cargo check`, we can run
now `cargo test`.
2017-12-05 18:31:56 -08:00
Shea Newton 2aa9b1d234 Address requested changes to quickchecking crate.
- Remove `whitelistable` and `blacklistable` types.
- Rename test crate directory from `property_test` to `quickchecking`.
- Add new CI job that checks that this crate continues to build.
- Revise matching logic to be more idomatic.
- Phase out modular arithmetic in favor of `gen_range`.
- Incorporate `unreachable!` into match statements.
- Revise logic for accessing random element of vector, favor `choose`
  over `nth`.
- Proper punctuation and capitalization in comments.
- Using actual structures rather than converting everything to strings
  in order to leverage type system.
- Add `#![deny(missing_docs)]` and filled in documentation required for
  the project to build again.
- Add special case logic so we don't generate structs with `long double`
  fields as it will cause tests to fail unitl issue \#550 is resolved

Note on making sure we don't lose test cases we're interested in
preserving:
We're copying the directories `TempDir` makes so we get things like
this:
```
├── bindgen_prop.1WYe3F5HZU1c
│   └── prop_test.h
├── bindgen_prop.H4SLI1JX0jd8
│   └── prop_test.h
```
I'm not sure that `TempDir` makes any claims about uniqueness, so
collisions
probably aren't impossible. I'm up for any suggestions on a more
bulletproof
solution.

_Tasks not addressed by this PR:_
* TODO: Add `cargo features` logic to allow generating problematic code.
* TODO: Make a [bin] target with CLI to manage test settings.
* TODO: Whitelisting and opaque types.
* TODO: Generate bitfields, C++, I-bogus-codegen cases.

Figured this would be a good point to update the PR but if any of the
above TODO
items should be incorporated before moving forward I'm up for it!

Thanks for taking another look!

r? @fitzgen
2017-11-29 19:59:35 -08:00
Nick Fitzgerald efdb1c5781 Explicitly install the latest rustfmt in CI 2017-09-07 10:52:31 -07:00
Nick Fitzgerald 59b85354a7 Run many parallel CI jobs
Our CI is performing multiple different jobs:

* For every libclang version we support:
  * With both debug and release profiles:
    * Generating bindings from our test headers, with and without extra
      assertions, and asserting there is no diff from the expectations.
    * Compiling and testing the generated bindings.
    * Compiling and testing the bindgen-integration crate.
* Testing the md book.
* Asserting that there aren't any system includes in any of the test headers.
* Asserting that all the pub functions have doc comments.

We were previously doing these things sequentially for each libclang
version. This commit breaks these jobs up explicitly and runs each of them one
at a time so that they can each be run in parallel, on different Travis CI
machines.
2017-08-10 15:27:17 -07:00
Emilio Cobos Álvarez e179367f7a ci: Cache LLVM builds.
Fixes #896
2017-08-09 12:27:38 +02:00
Nick Fitzgerald f4763bc8d4 Compile test expectations and run their unit tests in CI
Fixes a regression from d73507e which accidentally broke this.
2017-08-04 15:00:32 -07:00
Nick Fitzgerald d73507e62b Merge pull request #846 from UK992/appveyor
Setup Appveyor
2017-07-26 11:46:11 -07:00
UK992 b109a41cea Setup Appveyor 2017-07-26 19:56:40 +02:00
Nick Fitzgerald 1baf7dc1c8 s/servo/rust-lang-nursery/ \o/
Fixes #852
2017-07-25 16:32:13 -07:00
Nick Fitzgerald d792af6702 Speed up CI runs by only cargo checking for docs
Running `cargo check --features testing_only_docs` will catch missing doc
comments, and we can avoid doing a full build.
2017-07-18 13:13:49 -07:00
Nick Fitzgerald 945c66a764 Disallow system header file includes in our test suite
There is no guarantee that the system running the tests has the header file, let
alone the same version of it that you have. Any test with such an include
directive won't reliably produce the consistent bindings across systems.
2017-07-06 10:03:08 -07:00
Emilio Cobos Álvarez 9b4bd6bff7 Pin the mdbook version for CI.
Fixes #779.
2017-07-04 18:29:39 +02:00
Nick Fitzgerald d769f0e65a Run tests with RUST_BACKTRACE=1 2017-05-18 13:00:09 -07:00
Nick Fitzgerald 2d20e7e8ef Add the bindgen Users Guide
This commit adds a Users Guide, built with [mdbook][] (the same tool used
by *The Rust Book*).

It moves all the user documentation from the README.md into the Users Guide. It
leaves the README.md as a splash page featuring an example of what `bindgen` is
and does, a link to the Users Guide, a link to the docs.rs/bindgen API reference
documentation, and a link to CONTRIBUTING.md.

It ensures that the Users Guide builds with `mdbook`, and all code snippets
within it build as doctests and pass, on every CI run.

Finally, it builds and uploads the Users Guide every time CI passes on the
master branch.

[mdbook]: https://github.com/azerupi/mdBook
2017-04-26 18:05:24 -04:00
Nick Fitzgerald 5004ed43b2 Define extra assertion macros
This commit defines a new set of assertion macros that are only checked in
testing/CI when the `testing_only_extra_assertions` feature is enabled. This
makes it so that *users* of bindgen that happen to be making a debug build don't
enable all these extra and expensive assertions.

Additionally, this removes the `testing_only_assert_no_dangling_items` feature,
and runs the assertions that were previously gated on that feature when the new
`testing_only_extra_assertions` feature is enabled.
2017-04-07 09:58:46 -07:00
Nick Fitzgerald 88b7cd66a2 Clean up testing-only cargo features
This commit ensures that all of the cargo features we have that only exist for
CI/testing purposes, and aren't for external consumption, have a "testing_only_"
prefix.
2017-04-06 14:38:05 -07:00
Nick Fitzgerald b58c3e0fa1 Run tests with more versions of libclang
First, update our existing 3.8.X and 3.9.X libclang testing versions to their
latest point releases. Second, add testing on the latest 3.7.X release and the
latest 4.0.X release.
2017-03-16 10:39:08 -07:00
Nick Fitzgerald 9c2e6f01a3 Assert that code is properly rustfmted in CI
This commit makes Travis CI reject code which has not been run through the
latest version of `rustfmt`.

Additionally, it refactors our CI testing out into a couple little scripts.
2017-02-03 11:23:40 -08:00