2019-12-11 06:51:19 -08:00
|
|
|
#!/bin/bash
|
2018-07-10 09:14:27 -07:00
|
|
|
|
|
|
|
set -e
|
2018-07-13 15:29:25 -07:00
|
|
|
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_fold start "meson"
|
|
|
|
travis_time_start "meson"
|
2019-06-18 07:20:32 -07:00
|
|
|
if [ "$DISTRO" != "" ] ; then
|
2019-06-19 06:26:13 -07:00
|
|
|
# Why do we need to disable the imf loaders here?
|
2019-12-04 08:25:19 -08:00
|
|
|
OPTS=" -Decore-imf-loaders-disabler=scim,ibus"
|
2019-06-19 06:26:13 -07:00
|
|
|
|
2020-06-06 14:29:23 -07:00
|
|
|
MONO_LINUX_COPTS=" -Dbindings=cxx,mono -Dmono-beta=true"
|
2019-11-27 05:17:15 -08:00
|
|
|
|
2019-06-19 06:26:13 -07:00
|
|
|
WAYLAND_LINUX_COPTS=" -Dwl=true -Ddrm=true -Dopengl=es-egl -Dwl-deprecated=true -Ddrm-deprecated=true"
|
|
|
|
|
|
|
|
# TODO:
|
2019-12-06 11:40:20 -08:00
|
|
|
# - No libelogind package in fedora 30 repo
|
2019-12-09 05:41:17 -08:00
|
|
|
# - Ibus
|
2019-06-19 06:26:13 -07:00
|
|
|
ENABLED_LINUX_COPTS=" -Dfb=true -Dsdl=true -Dbuffer=true -Dbuild-id=travis-build \
|
2019-12-06 11:40:20 -08:00
|
|
|
-Ddebug-threads=true -Dglib=true -Dg-mainloop=true -Dxpresent=true -Dxinput22=true \
|
2020-03-03 12:38:58 -08:00
|
|
|
-Devas-loaders-disabler=json -Decore-imf-loaders-disabler= \
|
2020-05-28 10:32:03 -07:00
|
|
|
-Dharfbuzz=true -Dpixman=true -Dhyphen=true -Defl-one=true \
|
2020-06-06 10:09:21 -07:00
|
|
|
-Dvnc-server=true -Delua=true -Dbindings=lua,cxx,mono -Delogind=false -Dinstall-eo-files=true -Dphysics=true"
|
2019-06-19 06:26:13 -07:00
|
|
|
|
|
|
|
# Enabled png, jpeg evas loader for in tree edje file builds
|
|
|
|
DISABLED_LINUX_COPTS=" -Daudio=false -Davahi=false -Dx11=false -Dphysics=false -Deeze=false \
|
|
|
|
-Dopengl=none -Deina-magic-debug=false -Dbuild-examples=false -Dbuild-tests=false \
|
|
|
|
-Dcrypto=gnutls -Dglib=false -Dgstreamer=false -Dsystemd=false -Dpulseaudio=false \
|
2019-10-04 05:16:02 -07:00
|
|
|
-Dnetwork-backend=connman -Dxinput2=false -Dtslib=false \
|
2019-06-21 02:51:52 -07:00
|
|
|
-Devas-loaders-disabler=gst,pdf,ps,raw,svg,xcf,bmp,dds,eet,generic,gif,ico,jp2k,json,pmaps,psd,tga,tgv,tiff,wbmp,webp,xpm \
|
2020-03-03 12:38:58 -08:00
|
|
|
-Decore-imf-loaders-disabler=xim,ibus,scim \
|
|
|
|
-Dfribidi=false -Dfontconfig=false \
|
2019-06-19 06:26:13 -07:00
|
|
|
-Dedje-sound-and-video=false -Dembedded-lz4=false -Dlibmount=false -Dv4l2=false \
|
2020-06-06 10:09:21 -07:00
|
|
|
-Delua=false -Dnls=false -Dbindings= -Dlua-interpreter=luajit -Dnative-arch-optimization=false"
|
2019-06-19 06:26:13 -07:00
|
|
|
#evas_filter_parser.c:(.text+0xc59): undefined reference to `lua_getglobal' with interpreter lua
|
2018-11-07 08:06:10 -08:00
|
|
|
|
2019-06-18 07:20:32 -07:00
|
|
|
RELEASE_READY_LINUX_COPTS=" --buildtype=release"
|
2018-11-07 08:06:10 -08:00
|
|
|
|
2019-06-18 07:20:32 -07:00
|
|
|
MINGW_COPTS="--cross-file .ci/cross_toolchain.txt -Davahi=false -Deeze=false -Dsystemd=false \
|
|
|
|
-Dpulseaudio=false -Dx11=false -Dopengl=none -Dlibmount=false \
|
2020-06-09 00:43:57 -07:00
|
|
|
-Devas-loaders-disabler=json,pdf,ps,raw,svg,rsvg \
|
2019-07-01 01:24:04 -07:00
|
|
|
-Dharfbuzz=true -Dpixman=true -Dembedded-lz4=false "
|
2019-05-29 09:20:15 -07:00
|
|
|
|
2019-11-27 05:17:15 -08:00
|
|
|
if [ "$1" = "default" ]; then
|
|
|
|
OPTS="$OPTS $MONO_LINUX_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "options-enabled" ]; then
|
2019-06-18 07:20:32 -07:00
|
|
|
OPTS="$OPTS $ENABLED_LINUX_COPTS $WAYLAND_LINUX_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "options-disabled" ]; then
|
2019-06-18 07:20:32 -07:00
|
|
|
OPTS="$OPTS $DISABLED_LINUX_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "wayland" ]; then
|
2019-06-18 07:20:32 -07:00
|
|
|
OPTS="$OPTS $WAYLAND_LINUX_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "release-ready" ]; then
|
2019-06-18 07:20:32 -07:00
|
|
|
OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "coverity" ]; then
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_fold start "cov-download"
|
2020-06-02 07:03:00 -07:00
|
|
|
travis_time_start "cov-download"
|
|
|
|
OPTS="$OPTS $WAYLAND_LINUX_COPTS"
|
2019-06-25 09:11:33 -07:00
|
|
|
docker exec --env COVERITY_SCAN_TOKEN=$COVERITY_SCAN_TOKEN $(cat $HOME/cid) sh -c '.ci/coverity-tools-install.sh'
|
2020-06-02 07:03:00 -07:00
|
|
|
travis_time_finish "cov-download"
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_fold end "cov-download"
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$1" = "mingw" ]; then
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_fold start "cross-native"
|
2020-06-02 07:03:00 -07:00
|
|
|
travis_time_start "cross-native"
|
|
|
|
OPTS="$OPTS $MINGW_COPTS"
|
2019-12-09 05:41:17 -08:00
|
|
|
docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap-efl-native-for-cross.sh'
|
2020-06-02 07:03:00 -07:00
|
|
|
travis_time_finish "cross-native"
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_fold end "cross-native"
|
2019-06-25 09:11:33 -07:00
|
|
|
fi
|
|
|
|
|
2019-08-19 05:17:28 -07:00
|
|
|
if [ "$1" = "asan" ]; then
|
|
|
|
docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
|
|
|
--env CXX="ccache g++" --env CFLAGS="-O0 -g" --env CXXFLAGS="-O0 -g" \
|
|
|
|
--env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS -Db_sanitize=address"
|
|
|
|
elif [ "$1" = "mingw" ]; then
|
2019-06-19 06:26:08 -07:00
|
|
|
docker exec --env EIO_MONITOR_POLL=1 --env PKG_CONFIG_PATH="/ewpi-64-install/lib/pkgconfig/" \
|
2019-06-18 07:20:32 -07:00
|
|
|
$(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
|
2019-06-25 09:11:33 -07:00
|
|
|
elif [ "$1" = "coverity" ]; then
|
|
|
|
docker exec --env EIO_MONITOR_POLL=1 --env CFLAGS="-fdirectives-only" --env CC="gcc" --env CXX="g++"\
|
|
|
|
--env CXXFLAGS="-fdirectives-only" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
|
2018-11-07 08:06:10 -08:00
|
|
|
else
|
2019-06-19 06:26:08 -07:00
|
|
|
docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
2019-06-18 07:20:32 -07:00
|
|
|
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
|
|
|
--env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
|
2018-11-07 08:06:10 -08:00
|
|
|
fi
|
2019-12-09 05:41:17 -08:00
|
|
|
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
2019-06-18 07:20:32 -07:00
|
|
|
# Prepare OSX env for build
|
|
|
|
mkdir -p ~/Library/LaunchAgents
|
|
|
|
ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
|
|
|
|
launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
|
|
|
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
|
|
|
|
|
|
|
export CFLAGS="-I/usr/local/opt/openssl/include -frewrite-includes $CFLAGS"
|
|
|
|
export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
|
|
|
|
LIBFFI_VER=$(brew list --versions libffi|head -n1|cut -d' ' -f2)
|
2019-06-24 06:09:34 -07:00
|
|
|
export CC="ccache gcc"
|
2020-04-06 14:24:07 -07:00
|
|
|
#force using system zlib, which doesn't have a pc file provided because that's the smartest thing possible
|
|
|
|
zlib_vers=$(grep ZLIB_VERSION /usr/include/zlib.h|head -n1|awk '{print $3}'|cut -d'"' -f2)
|
|
|
|
sed -iE "s/REPLACE_THIS/$zlib_vers/" .ci/zlib.pc
|
|
|
|
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig:$(pwd)/.ci"
|
2020-03-03 12:38:58 -08:00
|
|
|
mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Dgstreamer=false
|
2020-03-24 05:11:31 -07:00
|
|
|
else # Native Ubuntu Linux Travis builds (non-docker)
|
|
|
|
OPTS=" -Decore-imf-loaders-disabler=scim,ibus"
|
|
|
|
|
|
|
|
if [ "$TRAVIS_CPU_ARCH" = "ppc64le" ]; then
|
|
|
|
OPTS="$OPTS -Dbindings="
|
2020-03-25 05:37:13 -07:00
|
|
|
elif [ "$TRAVIS_CPU_ARCH" = "s390x" ] ; then
|
|
|
|
OPTS="$OPTS -Dbindings= -Delua=false -Dlua-interpreter=lua"
|
2020-03-24 05:11:31 -07:00
|
|
|
fi
|
|
|
|
if [ "$1" = "codecov" ]; then
|
|
|
|
OPTS="$OPTS -Db_coverage=true"
|
|
|
|
fi
|
|
|
|
mkdir build && meson build $OPTS
|
2018-07-10 09:14:27 -07:00
|
|
|
fi
|
2019-12-11 06:51:19 -08:00
|
|
|
travis_time_finish "meson"
|
|
|
|
travis_fold end "meson"
|