mirror of
https://github.com/polybar/polybar.git
synced 2024-11-25 13:55:47 -05:00
refactor(travis): Add minimal build configuration
Uses none of the optional dependencies. This ensures that polybar can build without any of the supposedly optional dependencies. This would have detected the cause of the xrm build failure before it was merged
This commit is contained in:
parent
5d350dead8
commit
747cdfe7f5
3 changed files with 36 additions and 1 deletions
|
@ -69,6 +69,12 @@ matrix:
|
||||||
env: BUILD_TYPE=Debug
|
env: BUILD_TYPE=Debug
|
||||||
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps, *optional_deps]}}
|
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps, *optional_deps]}}
|
||||||
|
|
||||||
|
# Minimal build, contains no optional dependencies. This makes sure that
|
||||||
|
# we properly remove files from compilation that depend on libraries that
|
||||||
|
# are not installed
|
||||||
|
- compiler: gcc
|
||||||
|
env: BUILD_TYPE=Release POLYBAR_BUILD_TYPE=minimal
|
||||||
|
addons: {apt: {sources: *sources, packages: [*gcc, *base_deps]}}
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
ccache: true
|
ccache: true
|
||||||
|
|
|
@ -1,9 +1,32 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p "${TRAVIS_BUILD_DIR}/build"
|
mkdir -p "${TRAVIS_BUILD_DIR}/build"
|
||||||
cd "${TRAVIS_BUILD_DIR}/build" || false
|
cd "${TRAVIS_BUILD_DIR}/build" || false
|
||||||
|
|
||||||
|
FLAGS=""
|
||||||
|
|
||||||
|
# Disable all extra modules and X extensions for minimal builds
|
||||||
|
# Most of these should already be turned off because their libraries are not
|
||||||
|
# installed, but some may not be
|
||||||
|
if [ "$POLYBAR_BUILD_TYPE" == "minimal" ]; then
|
||||||
|
FLAGS=(
|
||||||
|
"-DENABLE_PULSEAUDIO=OFF"
|
||||||
|
"-DENABLE_NETWORK=OFF"
|
||||||
|
"-DENABLE_MPD=OFF"
|
||||||
|
"-DENABLE_CURL=OFF"
|
||||||
|
"-DENABLE_ALSA=OFF"
|
||||||
|
"-DENABLE_I3=OFF"
|
||||||
|
"-DWITH_XRM=OFF"
|
||||||
|
"-DWITH_XKB=OFF"
|
||||||
|
"-DWITH_XRANDR_MONITORS=OFF"
|
||||||
|
"-DWITH_XCURSOR=OFF"
|
||||||
|
"-DWITH_XRANDR=ON"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_C_COMPILER="${CC}" \
|
-DCMAKE_C_COMPILER="${CC}" \
|
||||||
-DCMAKE_CXX_COMPILER="${CXX}" \
|
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
|
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
|
||||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||||
-DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" ..
|
-DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" \
|
||||||
|
"${FLAGS[@]}" ..
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Don't install xrm on minimal builds because it is an optional dependency
|
||||||
|
if [ "$POLYBAR_BUILD_TYPE" == "minimal" ]; then
|
||||||
|
echo "Not installing xcb-xrm on minimal build"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Fail on error
|
# Fail on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue