-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Switch most CI to GitHub actions.
- Loading branch information
Showing
11 changed files
with
283 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
name: bindgen | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
# TODO: Should ideally be stable, but we use some nightly-only | ||
# features. | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Run rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check | ||
|
||
msrv: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install msrv | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
# MSRV below is documented in README.md, please update that if you | ||
# change this. | ||
toolchain: 1.40.0 | ||
override: true | ||
|
||
- name: Build with msrv | ||
run: rm Cargo.lock && cargo +1.40.0 build --lib | ||
|
||
quickchecking: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
# TODO: Actually run quickchecks once `bindgen` is reliable enough. | ||
- name: Build quickcheck tests | ||
run: cd tests/quickchecking && cargo test | ||
|
||
test-expectations: | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
# TODO(#1954): These should be run on mac too, but turns out they're | ||
# broken. | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Test expectations | ||
run: cd tests/expectations && cargo test | ||
|
||
test: | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
llvm_version: ["3.9", "4.0", "5.0", "9.0"] | ||
release_build: [0, 1] | ||
no_default_features: [0, 1] | ||
# FIXME: There are no pre-built static libclang libraries, so the | ||
# `static` feature is not testable atm. | ||
feature_runtime: [0, 1] | ||
feature_extra_asserts: [0] | ||
feature_testing_only_docs: [0] | ||
|
||
exclude: | ||
# 3.9 and 4.0 are too old to support regular dynamic linking, so this | ||
# is not expected to work. | ||
- os: ubuntu-latest | ||
llvm_version: "3.9" | ||
no_default_features: 1 | ||
feature_runtime: 0 | ||
|
||
- os: ubuntu-latest | ||
llvm_version: "4.0" | ||
no_default_features: 1 | ||
feature_runtime: 0 | ||
|
||
include: | ||
# Test with extra asserts + docs just with latest llvm versions to | ||
# prevent explosion | ||
- os: ubuntu-latest | ||
llvm_version: "9.0" | ||
release_build: 0 | ||
no_default_features: 0 | ||
feature_extra_asserts: 1 | ||
feature_testing_only_docs: 1 | ||
|
||
# Ensure stuff works on macos too | ||
- os: macos-latest | ||
llvm_version: "9.0" | ||
release_build: 0 | ||
no_default_features: 0 | ||
feature_extra_asserts: 0 | ||
feature_testing_only_docs: 0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run all the tests | ||
env: | ||
GITHUB_ACTIONS_OS: ${{matrix.os}} | ||
LLVM_VERSION: ${{matrix.llvm_version}} | ||
BINDGEN_RELEASE_BUILD: ${{matrix.release_build}} | ||
BINDGEN_FEATURE_RUNTIME: ${{matrix.feature_runtime}} | ||
BINDGEN_FEATURE_EXTRA_ASSERTS: ${{matrix.feature_extra_asserts}} | ||
BINDGEN_FEATURE_TESTING_ONLY_DOCS: ${{matrix.feature_testing_only_docs}} | ||
BINDGEN_NO_DEFAULT_FEATURES: ${{matrix.no_default_features}} | ||
run: ./ci/test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,15 @@ | ||
language: rust | ||
|
||
dist: xenial | ||
|
||
os: | ||
- linux | ||
|
||
rust: | ||
- stable | ||
|
||
env: | ||
global: | ||
- CARGO_TARGET_DIR=/tmp/bindgen | ||
matrix: | ||
# Miscellaneous tests. | ||
# Start "misc" job first since it runs longer than any other job. | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="misc" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="quickchecking" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="msrv" | ||
|
||
# General matrix. | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="test" BINDGEN_PROFILE= | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="integration" BINDGEN_PROFILE= | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="integration" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_NO_DEFAULT_FEATURES="1" BINDGEN_FEATURES="runtime" | ||
- LLVM_VERSION="3.9" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_NO_DEFAULT_FEATURES="1" BINDGEN_FEATURES="runtime" | ||
|
||
- LLVM_VERSION="4.0" BINDGEN_JOB="test" BINDGEN_PROFILE= | ||
- LLVM_VERSION="4.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="4.0" BINDGEN_JOB="integration" BINDGEN_PROFILE= | ||
- LLVM_VERSION="4.0" BINDGEN_JOB="integration" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="4.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_NO_DEFAULT_FEATURES="1" BINDGEN_FEATURES="runtime" | ||
- LLVM_VERSION="4.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_NO_DEFAULT_FEATURES="1" BINDGEN_FEATURES="runtime" | ||
|
||
- LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE= | ||
- LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="5.0" BINDGEN_JOB="integration" BINDGEN_PROFILE= | ||
- LLVM_VERSION="5.0" BINDGEN_JOB="integration" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_NO_DEFAULT_FEATURES="1" | ||
- LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
|
||
# FIXME: There are no pre-built static libclang libraries, so this is not testable at the moment. | ||
# - LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_FEATURES="static" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
# - LLVM_VERSION="5.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_FEATURES="static" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
|
||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE= | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="integration" BINDGEN_PROFILE= | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="integration" BINDGEN_PROFILE="--release" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_NO_DEFAULT_FEATURES="1" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
|
||
# FIXME: There are no pre-built static libclang libraries, so this is not testable at the moment. | ||
# - LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_FEATURES="static" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
# - LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_FEATURES="static" BINDGEN_NO_DEFAULT_FEATURES="1" | ||
|
||
# Testing with extra asserts enabled | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE= BINDGEN_FEATURES="testing_only_extra_assertions" | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" BINDGEN_FEATURES="testing_only_extra_assertions" | ||
|
||
|
||
# Test the expectations build and pass tests. | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="expectations" BINDGEN_PROFILE= | ||
- LLVM_VERSION="9.0" BINDGEN_JOB="expectations" BINDGEN_PROFILE="--release" | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
# Include a few jobs for spot-checking different configurations without | ||
# invoking combinatoric explosion of Travis jobs. | ||
include: | ||
- os: osx | ||
env: LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE= | ||
- os: osx | ||
env: LLVM_VERSION="9.0" BINDGEN_JOB="test" BINDGEN_PROFILE="--release" | ||
- os: osx | ||
env: LLVM_VERSION="9.0" BINDGEN_JOB="integration" BINDGEN_PROFILE= | ||
- os: osx | ||
env: LLVM_VERSION="9.0" BINDGEN_JOB="integration" BINDGEN_PROFILE="--release" | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cargo | ||
- $HOME/.llvm-builds | ||
|
||
before_install: . ./ci/before_install.sh | ||
|
||
script: | ||
- BINDGEN_JOB="$BINDGEN_JOB" BINDGEN_PROFILE="$BINDGEN_PROFILE" BINDGEN_FEATURES="$BINDGEN_FEATURES" BINDGEN_NO_DEFAULT_FEATURES="$BINDGEN_NO_DEFAULT_FEATURES" ./ci/script.sh | ||
|
||
- ./ci/test-book.sh | ||
after_success: | ||
- test "$TRAVIS_PULL_REQUEST" == "false" && | ||
test "$TRAVIS_BRANCH" == "master" && | ||
test "$BINDGEN_JOB" == "misc" && | ||
./ci/deploy-book.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.