Commit Graph

50 Commits

Author SHA1 Message Date
Christian Poveda 1213b3dfb1 split the repo into a workspace
remove `clap` dependency 🎉

update the book installation instructions
2022-10-04 20:47:17 -05:00
Saleem Rashid 5dc6a5fafb Run tests on AArch64 using Debian multiarch and QEMU 2021-02-08 13:29:31 +01:00
Saleem Rashid c940e81650 Revert "Run tests on AArch64"
This reverts commit 74da49b507.
2021-02-08 13:29:31 +01:00
Corey Farwell 74da49b507 Run tests on AArch64 2021-02-04 16:46:38 +01:00
Emilio Cobos Álvarez a5f9b70dca ci: Move the remaining CI tasks (updating the book) to GitHub actions. 2020-12-26 20:46:42 +01:00
Emilio Cobos Álvarez 259be1235f ci: Switch most CI to GitHub actions. 2020-12-26 19:01:53 +01:00
Kyle Mayes 6f9d97a2ac 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 d537b6523f ci: Remove extraneous variable declaration 2020-08-03 17:57:55 +02:00
Darren Kulp 8a36ddc937 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 4f168959a1 ci: Remove overrides for unsupported LLVM versions 2020-08-03 17:57:55 +02:00
Darren Kulp de89cd5377 ci: Use llvm-5.0.1 to simplify target triple 2020-08-03 17:57:55 +02:00
Darren Kulp c80444acdb 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 a1426bae33 ci: always try to find a nightly toolchain with rustfmt. 2020-06-15 02:13:39 +02:00
Denis Lisov 990ed12b84 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 8301d97fc0 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 c9be57c074 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 d10e09ecca Enforce rustfmt on automation. 2019-10-14 14:15:46 +02:00
Emilio Cobos Álvarez 821cc7ef1a Add llvm 9.0 to CI. 2019-10-14 14:15:46 +02:00
Emilio Cobos Álvarez 003301f9d9 Improve the script to enforce rustfmt on automation. 2019-09-17 11:53:23 +09:00
Ryan Lopopolo 231c2cc1bd Add rustfmt to nightly toolchain 2019-09-17 09:35:52 +09:00
Ryan Lopopolo 200bf94b18 Set RUSTFMT for nofeatures tests 2019-09-17 09:35:52 +09:00
Ryan Lopopolo 573bed6f1d lint ci/script.sh 2019-09-17 09:35:52 +09:00
Ryan Lopopolo 2bb230589e Test bindgen with no default features 2019-09-17 09:35:52 +09:00
Emilio Cobos Álvarez f05876e369 Fix rustfmt installation to be via rustup. 2019-07-26 17:10:11 +02:00
Alex Touchet f54caa7cde Update Links 2019-05-21 13:41:42 +02:00
Emilio Cobos Álvarez f81cf40c46 Update mdbook. 2018-09-08 02:29:38 +02:00
Emilio Cobos Álvarez 449f6f8efe Add -x to the CI script. 2018-04-03 11:27:56 +02:00
Emilio Cobos Álvarez de787e2488 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 374e530bb4 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 29af819fb6 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 8b1b12f4fc 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 fe2ef54886 Explicitly install the latest rustfmt in CI 2017-09-07 10:52:31 -07:00
Nick Fitzgerald c801bc00d9 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 a7c35b8959 ci: Cache LLVM builds.
Fixes #896
2017-08-09 12:27:38 +02:00
Nick Fitzgerald a47becfdef Compile test expectations and run their unit tests in CI
Fixes a regression from 8f03935 which accidentally broke this.
2017-08-04 15:00:32 -07:00
Nick Fitzgerald 8f03935353 Merge pull request #846 from UK992/appveyor
Setup Appveyor
2017-07-26 11:46:11 -07:00
UK992 866bb51a04 Setup Appveyor 2017-07-26 19:56:40 +02:00
Nick Fitzgerald 8132a4d942 s/servo/rust-lang-nursery/ \o/
Fixes #852
2017-07-25 16:32:13 -07:00
Nick Fitzgerald dd1d40de0a 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 66fca0cf78 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 3f55ea3563 Pin the mdbook version for CI.
Fixes #779.
2017-07-04 18:29:39 +02:00
Nick Fitzgerald 752c5343ea Run tests with RUST_BACKTRACE=1 2017-05-18 13:00:09 -07:00
Nick Fitzgerald abab29ea7f 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 fe244b58da 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 5df7e40a2f 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 ff6b225ceb 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 275b4a7e0a 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
Emilio Cobos Álvarez 99d6f5a99c Re-enable OSX builds on Travis CI
This reverts commit 4b2b1cff42.
2017-02-02 17:12:58 +01:00
Nick Fitzgerald 4b2b1cff42 Disable OSX builds on Travis CI
The wait time to get OSX machines on Travis CI is *way* too long at the
moment. We'll be able to revert this commit in the future, once Travis
CI adds more OSX machines to their cluster, hopefully.
2016-11-11 10:13:26 -08:00
Kyle Mayes e74a4dc62b Rework CI and add macOS builds 2016-11-04 21:38:33 -04:00