Add --release to ./configure, test via travis

This commit is contained in:
Marvin W 2019-12-25 20:28:07 +01:00
parent f3af064262
commit 7d1497a549
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
2 changed files with 12 additions and 5 deletions

View file

@ -1,11 +1,14 @@
dist: bionic dist: bionic
language: c language: c
env:
- CONFIGURE_FLAGS=
- CONFIGURE_FLAGS=--release
before_install: before_install:
- export USE_CCACHE=1 - export USE_CCACHE=1
- sudo apt-get update - sudo apt-get update
- sudo apt-get install -y cmake valac libgee-0.8-dev libsqlite3-dev libgtk-3-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev - sudo apt-get install -y cmake valac libgee-0.8-dev libsqlite3-dev libgtk-3-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev
install: install:
- ./configure --with-tests - ./configure --with-tests $CONFIGURE_FLAGS
- make - make
script: script:
- build/xmpp-vala-test - build/xmpp-vala-test

12
configure vendored
View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
OPTS=`getopt -o "h" --long \ OPTS=`getopt -o "h" --long \
help,fetch-only,no-debug,disable-fast-vapi,with-tests,\ help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,\
enable-plugin:,disable-plugin:,\ enable-plugin:,disable-plugin:,\
prefix:,program-prefix:,exec-prefix:,lib-suffix:,\ prefix:,program-prefix:,exec-prefix:,lib-suffix:,\
bindir:,libdir:,includedir:,datadir:,\ bindir:,libdir:,includedir:,datadir:,\
@ -18,6 +18,7 @@ PREFIX=${PREFIX:-/usr/local}
ENABLED_PLUGINS= ENABLED_PLUGINS=
DISABLED_PLUGINS= DISABLED_PLUGINS=
BUILD_TESTS= BUILD_TESTS=
BUILD_TYPE=Debug
DISABLE_FAST_VAPI= DISABLE_FAST_VAPI=
LIB_SUFFIX= LIB_SUFFIX=
NO_DEBUG= NO_DEBUG=
@ -46,13 +47,14 @@ brackets.
Configuration: Configuration:
-h, --help Print this help and exit -h, --help Print this help and exit
--fetch-only Only fetch the files required to run ./configure
without network access later and exit
--no-debug Build without debug symbols
--disable-fast-vapi Disable the usage of Vala compilers fast-vapi --disable-fast-vapi Disable the usage of Vala compilers fast-vapi
feature. fast-vapi mode is slower when doing feature. fast-vapi mode is slower when doing
clean builds, but faster when doing incremental clean builds, but faster when doing incremental
builds (during development). builds (during development).
--fetch-only Only fetch the files required to run ./configure
without network access later and exit
--no-debug Build without debug symbols
--release Configure to build an optimized release version
--with-tests Also build tests. --with-tests Also build tests.
Plugin configuration: Plugin configuration:
@ -111,6 +113,7 @@ while true; do
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;; --disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
--no-debug ) NO_DEBUG=yes; shift ;; --no-debug ) NO_DEBUG=yes; shift ;;
--fetch-only ) FETCH_ONLY=yes; shift ;; --fetch-only ) FETCH_ONLY=yes; shift ;;
--release ) BUILD_TYPE=RelWithDebInfo; shift ;;
--with-tests ) BUILD_TESTS=yes; shift ;; --with-tests ) BUILD_TESTS=yes; shift ;;
# Autotools paths # Autotools paths
--program-prefix ) PREFIX="$2"; shift; shift ;; --program-prefix ) PREFIX="$2"; shift; shift ;;
@ -249,6 +252,7 @@ echo "$cmake_type" > .cmake_type
echo "$ninja_version" > .ninja_version echo "$ninja_version" > .ninja_version
cmake -G "$cmake_type" \ cmake -G "$cmake_type" \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DENABLED_PLUGINS="$ENABLED_PLUGINS" \ -DENABLED_PLUGINS="$ENABLED_PLUGINS" \
-DDISABLED_PLUGINS="$DISABLED_PLUGINS" \ -DDISABLED_PLUGINS="$DISABLED_PLUGINS" \
-DBUILD_TESTS="$BUILD_TESTS" \ -DBUILD_TESTS="$BUILD_TESTS" \