Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #137 from sdroege/travis-xenial
Browse files Browse the repository at this point in the history
Bring Travis and AppVeyor configurations in sync with the GLib one
  • Loading branch information
GuillaumeGomez committed Feb 12, 2019
2 parents fd037fe + 293c84a commit 466d615
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
34 changes: 20 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
dist: xenial
language: rust
matrix:
include:
- os: linux
rust: nightly
env: GTK=3.4
env: GTK=3.14 FEATURES=
- os: linux
rust: nightly
env: GTK=3.22.30
env: GTK=3.24 FEATURES=v1_38
- os: linux
rust: beta
env: GTK=3.4
env: GTK=3.14 FEATURES=
- os: linux
rust: beta
env: GTK=3.22.30
env: GTK=3.24 FEATURES=v1_38
- os: linux
rust: 1.31.0
env: GTK=3.4
env: GTK=3.14 FEATURES=
- os: linux
rust: 1.31.0
env: GTK=3.22.30
env: GTK=3.24 FEATURES=v1_38
- os: osx
rust: nightly
env: GTK=3.4
env: GTK=3.14 FEATURES=
# - os: osx
# rust: nightly
# env: GTK=3.22.30
# env: GTK=3.24 FEATURES=v1_38
- os: osx
rust: beta
env: GTK=3.4
env: GTK=3.14 FEATURES=
# - os: osx
# rust: beta
# env: GTK=3.22.30
# env: GTK=3.24 FEATURES=v1_38
- os: osx
rust: stable
env: GTK=3.4
env: GTK=3.14 FEATURES=
# - os: osx
# rust: stable
# env: GTK=3.22.30
sudo: true
# env: GTK=3.24 FEATURES=v1_38
addons:
apt:
packages:
Expand All @@ -50,9 +50,15 @@ before_install:
fi
script:
- rustc --version
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ] && [ "$GTK" == "3.4" ]; then
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ] && [ "$GTK" == "3.14" ]; then
make regen_check;
fi
- cargo doc --features "dox,embed-lgpl-docs"
- cargo test --features "$FEATURES,embed-lgpl-docs"
# catch any sneaked in lgpl docs
- cargo build --features "$FEATURES,purge-lgpl-docs" --jobs 1
- git diff -R --exit-code
- rustc --version
- mkdir .cargo
- echo 'paths = ["."]' > .cargo/config
- git clone -q --depth 50 -b pending https://github.com/gtk-rs/examples _examples
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ v1_38 = ["v1_36_7", "pango-sys/v1_38"]
v1_40 = ["v1_38"]
v1_42 = ["v1_40", "pango-sys/v1_42"]
dox = ["pango-sys/dox", "glib/dox"]
purge-lgpl-docs = ["gtk-rs-lgpl-docs"]
embed-lgpl-docs = ["gtk-rs-lgpl-docs"]

[build-dependencies.gtk-rs-lgpl-docs]
version = "0.1.3"
optional = true
git = "https://github.com/gtk-rs/lgpl-docs"

[dependencies]
libc = "0.2"
Expand Down
4 changes: 3 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ install:

build_script:
- cargo doc --features "dox"
- cargo test
- cargo test --features v1_42
- mkdir .cargo
- echo paths = ["."] > .cargo\config
- git clone -q --depth 50 -b pending https://github.com/gtk-rs/examples _examples
- cd _examples
- cargo build
- cargo build --features gtk_3_18
- cargo build --features gtk_3_24

test: false
20 changes: 20 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
fn main() {
manage_docs();
}

#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))]
fn manage_docs () {
extern crate lgpl_docs;
const PATH: &'static str = "src";
const IGNORES: &'static [&'static str] = &[
"lib.rs",
"prelude.rs",
];
lgpl_docs::purge(PATH, IGNORES);
if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::Pango, PATH, IGNORES);
}
}

#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))]
fn manage_docs() { }

0 comments on commit 466d615

Please sign in to comment.