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 #276 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 9, 2019
2 parents 4ea70d0 + cd769bb commit 2000355
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 21 deletions.
34 changes: 15 additions & 19 deletions .travis.yml
@@ -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=v3_16
- 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=v3_16
- 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=v3_16
- 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=v3_16
- 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=v3_16
- 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=v3_16
addons:
apt:
packages:
Expand All @@ -54,15 +54,11 @@ script:
make regen_check;
fi
- ./check_init_asserts
- cargo update
- cargo test --features embed-lgpl-docs --jobs 1
# catch any sneaked in lgpl docs
- cargo build --features purge-lgpl-docs --jobs 1
- git diff -R --exit-code
- cargo doc --features "dox"
- cargo test --features "$FEATURES"
- rustc --version
- mkdir .cargo
- echo 'paths = ["."]' > .cargo/config
- git clone -q --depth 50 -b pending https://github.com/gtk-rs/examples _examples
- cd _examples
- cargo update
- ./build_travis.sh
5 changes: 4 additions & 1 deletion appveyor.yml
Expand Up @@ -16,12 +16,15 @@ install:
- pacman --noconfirm -S mingw-w64-%ARCH%-gtk3

build_script:
- cargo doc --features "dox"
- cargo test
- cargo test --features v3_24
- cargo doc --features "dox"
- 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
18 changes: 17 additions & 1 deletion check_init_asserts
@@ -1,3 +1,19 @@
#!/bin/sh

perl -0777 -ne 'BEGIN { $e = 0 } while (/^(?!\s*\/\/|\s*unsafe)(\N*) fn (\w+)(<.*>)?(\((?!self|&\s*self|&\x27\w+\s+self|&mut\s+self|&\x27\w+\s+mut\s+self)[^{;]+)\{(\s+)(?!assert_init|assert_not_init|skip_assert_init)\S/gms) { print "$ARGV:$2$4\n"; $e = 1 }; END { exit $e }' src/*.rs
perl -0777 -ne '
BEGIN { $e = 0 }
while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) {
($modifiers, $name, $signature, $first_line) = ($1, $2, $4, $5);
unless ($modifiers =~ /^\s*(\/\/|(pub )?unsafe)/ ||
$signature =~ /^\(\s*(&(\x27\w+ )?)?(mut )?self\b/ ||
$signature =~ /^\(\)/ ||
$first_line =~ /^\s*(
assert_initialized_main_thread |
assert_not_initialized |
skip_assert_initialized
)!\(\)/x) {
print "$ARGV: $name$signature\n";
$e = 1
}
}
END { exit $e }' src/*.rs src/auto/*.rs

0 comments on commit 2000355

Please sign in to comment.