1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-14 18:43:01 +01:00

chore: Remove astyle from travis build.

The astyle check is now done by restyled.
This commit is contained in:
iphydf 2020-05-04 21:18:38 +01:00
parent b334622d36
commit b5ace27a3e
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
4 changed files with 43 additions and 45 deletions

View File

@ -4,10 +4,13 @@ python: nightly
dist: xenial dist: xenial
os: linux os: linux
addons: jobs:
include:
- env: JOB=linux
addons:
apt: apt:
packages: packages:
- astyle
- libalut-dev - libalut-dev
- libconfig-dev - libconfig-dev
- libnotify-dev - libnotify-dev
@ -16,11 +19,11 @@ addons:
- libqrencode-dev - libqrencode-dev
- libvpx-dev - libvpx-dev
cache: cache:
directories: directories:
- $HOME/cache - $HOME/cache
install: install:
# Where to find libraries. # Where to find libraries.
- export LD_LIBRARY_PATH=$HOME/cache/usr/lib - export LD_LIBRARY_PATH=$HOME/cache/usr/lib
- export PKG_CONFIG_PATH=$HOME/cache/usr/lib/pkgconfig - export PKG_CONFIG_PATH=$HOME/cache/usr/lib/pkgconfig
@ -30,11 +33,6 @@ install:
# c-toxcore # c-toxcore
- git clone --depth=1 https://github.com/TokTok/c-toxcore ../c-toxcore - git clone --depth=1 https://github.com/TokTok/c-toxcore ../c-toxcore
- test -f $HOME/cache/usr/lib/libtoxcore.so || (cd ../c-toxcore && cmake -B_build -H. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/cache/usr && make -C_build install -j$(nproc)) - test -f $HOME/cache/usr/lib/libtoxcore.so || (cd ../c-toxcore && cmake -B_build -H. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/cache/usr && make -C_build install -j$(nproc))
# astyle
- wget -O ../astyle.tar.gz https://deb.debian.org/debian/pool/main/a/astyle/astyle_2.06.orig.tar.gz
- test -f $HOME/cache/astyle/build/gcc/bin/astyle || (tar -xf ../astyle.tar.gz -C "$HOME/cache" && make -C "$HOME/cache/astyle/build/gcc" -j2)
script: script:
- $HOME/cache/astyle/build/gcc/bin/astyle --options=astylerc $(find . -name "*.[ch]") - make ENABLE_PYTHON=1 -j$(nproc)
- git diff --exit-code
- make ENABLE_PYTHON=1 -j2

View File

@ -8,13 +8,13 @@ else
endif endif
# Check if we can build audio support # Check if we can build audio support
CHECK_AUDIO_LIBS = $(shell $(PKG_CONFIG) --exists $(AUDIO_LIBS) || echo -n "error") CHECK_AUDIO_LIBS := $(shell $(PKG_CONFIG) --exists $(AUDIO_LIBS) || echo -n "error")
ifneq ($(CHECK_AUDIO_LIBS), error) ifneq ($(CHECK_AUDIO_LIBS), error)
LIBS += $(AUDIO_LIBS) LIBS += $(AUDIO_LIBS)
CFLAGS += $(AUDIO_CFLAGS) CFLAGS += $(AUDIO_CFLAGS)
OBJ += $(AUDIO_OBJ) OBJ += $(AUDIO_OBJ)
else ifneq ($(MAKECMDGOALS), clean) else ifneq ($(MAKECMDGOALS), clean)
MISSING_AUDIO_LIBS = $(shell for lib in $(AUDIO_LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done) MISSING_AUDIO_LIBS := $(shell for lib in $(AUDIO_LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done)
$(warning WARNING -- Toxic will be compiled without audio support) $(warning WARNING -- Toxic will be compiled without audio support)
$(warning WARNING -- You need these libraries for audio support) $(warning WARNING -- You need these libraries for audio support)
$(warning WARNING -- $(MISSING_AUDIO_LIBS)) $(warning WARNING -- $(MISSING_AUDIO_LIBS))

View File

@ -1,19 +1,19 @@
CHECKS_DIR = $(CFG_DIR)/checks CHECKS_DIR = $(CFG_DIR)/checks
# Check if we want build X11 support # Check if we want build X11 support
X11 = $(shell if [ -z "$(DISABLE_X11)" ] || [ "$(DISABLE_X11)" = "0" ] ; then echo enabled ; else echo disabled ; fi) X11 := $(shell if [ -z "$(DISABLE_X11)" ] || [ "$(DISABLE_X11)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(X11), disabled) ifneq ($(X11), disabled)
-include $(CHECKS_DIR)/x11.mk -include $(CHECKS_DIR)/x11.mk
endif endif
# Check if we want build audio support # Check if we want build audio support
AUDIO = $(shell if [ -z "$(DISABLE_AV)" ] || [ "$(DISABLE_AV)" = "0" ] ; then echo enabled ; else echo disabled ; fi) AUDIO := $(shell if [ -z "$(DISABLE_AV)" ] || [ "$(DISABLE_AV)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(AUDIO), disabled) ifneq ($(AUDIO), disabled)
-include $(CHECKS_DIR)/audio.mk -include $(CHECKS_DIR)/audio.mk
endif endif
# Check if we want build video support # Check if we want build video support
VIDEO = $(shell if [ -z "$(DISABLE_VI)" ] || [ "$(DISABLE_VI)" = "0" ] ; then echo enabled ; else echo disabled ; fi) VIDEO := $(shell if [ -z "$(DISABLE_VI)" ] || [ "$(DISABLE_VI)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(X11), disabled) ifneq ($(X11), disabled)
ifneq ($(AUDIO), disabled) ifneq ($(AUDIO), disabled)
ifneq ($(VIDEO), disabled) ifneq ($(VIDEO), disabled)
@ -23,42 +23,42 @@ endif
endif endif
# Check if we want build sound notifications support # Check if we want build sound notifications support
SND_NOTIFY = $(shell if [ -z "$(DISABLE_SOUND_NOTIFY)" ] || [ "$(DISABLE_SOUND_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi) SND_NOTIFY := $(shell if [ -z "$(DISABLE_SOUND_NOTIFY)" ] || [ "$(DISABLE_SOUND_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(SND_NOTIFY), disabled) ifneq ($(SND_NOTIFY), disabled)
-include $(CHECKS_DIR)/sound_notifications.mk -include $(CHECKS_DIR)/sound_notifications.mk
endif endif
# Check if we want build desktop notifications support # Check if we want build desktop notifications support
DESK_NOTIFY = $(shell if [ -z "$(DISABLE_DESKTOP_NOTIFY)" ] || [ "$(DISABLE_DESKTOP_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi) DESK_NOTIFY := $(shell if [ -z "$(DISABLE_DESKTOP_NOTIFY)" ] || [ "$(DISABLE_DESKTOP_NOTIFY)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(DESK_NOTIFY), disabled) ifneq ($(DESK_NOTIFY), disabled)
-include $(CHECKS_DIR)/desktop_notifications.mk -include $(CHECKS_DIR)/desktop_notifications.mk
endif endif
# Check if we want build QR export support # Check if we want build QR export support
QR_CODE = $(shell if [ -z "$(DISABLE_QRCODE)" ] || [ "$(DISABLE_QRCODE)" = "0" ] ; then echo enabled ; else echo disabled ; fi) QR_CODE := $(shell if [ -z "$(DISABLE_QRCODE)" ] || [ "$(DISABLE_QRCODE)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(QR_CODE), disabled) ifneq ($(QR_CODE), disabled)
-include $(CHECKS_DIR)/qr.mk -include $(CHECKS_DIR)/qr.mk
endif endif
# Check if we want build QR exported as PNG support # Check if we want build QR exported as PNG support
QR_PNG = $(shell if [ -z "$(DISABLE_QRPNG)" ] || [ "$(DISABLE_QRPNG)" = "0" ] ; then echo enabled ; else echo disabled ; fi) QR_PNG := $(shell if [ -z "$(DISABLE_QRPNG)" ] || [ "$(DISABLE_QRPNG)" = "0" ] ; then echo enabled ; else echo disabled ; fi)
ifneq ($(QR_PNG), disabled) ifneq ($(QR_PNG), disabled)
-include $(CHECKS_DIR)/qr_png.mk -include $(CHECKS_DIR)/qr_png.mk
endif endif
# Check if we want build Python scripting support # Check if we want build Python scripting support
PYTHON = $(shell if [ -z "$(ENABLE_PYTHON)" ] || [ "$(ENABLE_PYTHON)" = "0" ] ; then echo disabled ; else echo enabled ; fi) PYTHON := $(shell if [ -z "$(ENABLE_PYTHON)" ] || [ "$(ENABLE_PYTHON)" = "0" ] ; then echo disabled ; else echo enabled ; fi)
ifneq ($(PYTHON), disabled) ifneq ($(PYTHON), disabled)
-include $(CHECKS_DIR)/python.mk -include $(CHECKS_DIR)/python.mk
endif endif
# Check if we can build Toxic # Check if we can build Toxic
CHECK_LIBS = $(shell $(PKG_CONFIG) --exists $(LIBS) || echo -n "error") CHECK_LIBS := $(shell $(PKG_CONFIG) --exists $(LIBS) || echo -n "error")
ifneq ($(CHECK_LIBS), error) ifneq ($(CHECK_LIBS), error)
CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS)) CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs $(LIBS)) LDFLAGS += $(shell $(PKG_CONFIG) --libs $(LIBS))
else ifneq ($(MAKECMDGOALS), clean) else ifneq ($(MAKECMDGOALS), clean)
MISSING_LIBS = $(shell for lib in $(LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done) MISSING_LIBS := $(shell for lib in $(LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done)
$(warning ERROR -- Cannot compile Toxic) $(warning ERROR -- Cannot compile Toxic)
$(warning ERROR -- You need these libraries) $(warning ERROR -- You need these libraries)
$(warning ERROR -- $(MISSING_LIBS)) $(warning ERROR -- $(MISSING_LIBS))

View File

@ -3,12 +3,12 @@ DESK_NOTIFY_LIBS = libnotify
DESK_NOTIFY_CFLAGS = -DBOX_NOTIFY DESK_NOTIFY_CFLAGS = -DBOX_NOTIFY
# Check if we can build desktop notifications support # Check if we can build desktop notifications support
CHECK_DESK_NOTIFY_LIBS = $(shell $(PKG_CONFIG) --exists $(DESK_NOTIFY_LIBS) || echo -n "error") CHECK_DESK_NOTIFY_LIBS := $(shell $(PKG_CONFIG) --exists $(DESK_NOTIFY_LIBS) || echo -n "error")
ifneq ($(CHECK_DESK_NOTIFY_LIBS), error) ifneq ($(CHECK_DESK_NOTIFY_LIBS), error)
LIBS += $(DESK_NOTIFY_LIBS) LIBS += $(DESK_NOTIFY_LIBS)
CFLAGS += $(DESK_NOTIFY_CFLAGS) CFLAGS += $(DESK_NOTIFY_CFLAGS)
else ifneq ($(MAKECMDGOALS), clean) else ifneq ($(MAKECMDGOALS), clean)
MISSING_DESK_NOTIFY_LIBS = $(shell for lib in $(DESK_NOTIFY_LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done) MISSING_DESK_NOTIFY_LIBS := $(shell for lib in $(DESK_NOTIFY_LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done)
$(warning WARNING -- Toxic will be compiled without desktop notifications support) $(warning WARNING -- Toxic will be compiled without desktop notifications support)
$(warning WARNING -- You need these libraries for desktop notifications support) $(warning WARNING -- You need these libraries for desktop notifications support)
$(warning WARNING -- $(MISSING_DESK_NOTIFY_LIBS)) $(warning WARNING -- $(MISSING_DESK_NOTIFY_LIBS))