Add shellcheck to the build
This commit is contained in:
7
.travis/after_script.sh
Executable file
7
.travis/after_script.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$TYPE" != 'style' ]; then
|
||||
ccache -s
|
||||
fi
|
||||
11
.travis/install.sh
Executable file
11
.travis/install.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$TYPE" = 'style' ]; then
|
||||
sudo apt-get -yqq update
|
||||
sudo apt-get install shellcheck
|
||||
else
|
||||
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.before_install.sh"
|
||||
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.install.sh"
|
||||
fi
|
||||
2
.travis/linux..before_install.sh
Normal file → Executable file
2
.travis/linux..before_install.sh
Normal file → Executable file
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo add-apt-repository ppa:andrewrk/libgroove -y
|
||||
sudo sed -e "s/trusty/precise/" -i \
|
||||
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list
|
||||
|
||||
2
.travis/linux..install.sh
Normal file → Executable file
2
.travis/linux..install.sh
Normal file → Executable file
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev
|
||||
libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev
|
||||
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
|
||||
|
||||
2
.travis/linux..script.sh
Normal file → Executable file
2
.travis/linux..script.sh
Normal file → Executable file
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake -DUSE_WERROR=ON $CMAKE_FLAGS ..
|
||||
|
||||
1
.travis/linux.win.download.sh
Normal file → Executable file
1
.travis/linux.win.download.sh
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CACHE_DIR=$TRAVIS_BUILD_DIR/apt_mingw_cache/$1
|
||||
|
||||
2
.travis/linux.win32.before_install.sh
Normal file → Executable file
2
.travis/linux.win32.before_install.sh
Normal file → Executable file
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo add-apt-repository ppa:tobydox/mingw-x-trusty -y
|
||||
sudo apt-get update -qq
|
||||
|
||||
8
.travis/linux.win32.install.sh
Normal file → Executable file
8
.travis/linux.win32.install.sh
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$QT5" ]; then
|
||||
@@ -15,10 +16,7 @@ MINGW_PACKAGES="mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x
|
||||
|
||||
export MINGW_PACKAGES
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "$DIR/linux.win.download.sh" win32
|
||||
"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win32
|
||||
|
||||
PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32 $MINGW_PACKAGES"
|
||||
|
||||
@@ -29,6 +27,6 @@ sudo apt-get install -y $PACKAGES
|
||||
# to use @file command line passing, which in turn ccache 3.1.9 doesn't support
|
||||
pushd /tmp
|
||||
wget http://archive.ubuntu.com/ubuntu/pool/main/c/ccache/ccache_3.2.4-1_amd64.deb
|
||||
sha256sum -c $TRAVIS_BUILD_DIR/.travis/ccache.sha256
|
||||
sha256sum -c "$TRAVIS_BUILD_DIR/.travis/ccache.sha256"
|
||||
sudo dpkg -i ccache_3.2.4-1_amd64.deb
|
||||
popd
|
||||
|
||||
2
.travis/linux.win32.script.sh
Normal file → Executable file
2
.travis/linux.win32.script.sh
Normal file → Executable file
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
|
||||
../cmake/build_mingw32.sh
|
||||
|
||||
4
.travis/linux.win64.before_install.sh
Normal file → Executable file
4
.travis/linux.win64.before_install.sh
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. .travis/linux.win32.before_install.sh
|
||||
set -e
|
||||
|
||||
"$TRAVIS_BUILD_DIR/.travis/linux.win32.before_install.sh"
|
||||
|
||||
10
.travis/linux.win64.install.sh
Normal file → Executable file
10
.travis/linux.win64.install.sh
Normal file → Executable file
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# First, install 32-bit deps
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# shellcheck disable=SC1090
|
||||
. "$DIR/linux.win32.install.sh"
|
||||
|
||||
"$TRAVIS_BUILD_DIR/.travis/linux.win32.install.sh"
|
||||
|
||||
if [ "$QT5" ]; then
|
||||
MINGW_PACKAGES="mingw64-x-qt5base"
|
||||
@@ -21,9 +19,7 @@ MINGW_PACKAGES="mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x
|
||||
|
||||
export MINGW_PACKAGES
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# shellcheck disable=SC1090
|
||||
. "$DIR/linux.win.download.sh" win64
|
||||
"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win64
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
sudo apt-get install -y $MINGW_PACKAGES
|
||||
|
||||
2
.travis/linux.win64.script.sh
Normal file → Executable file
2
.travis/linux.win64.script.sh
Normal file → Executable file
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
|
||||
../cmake/build_mingw64.sh
|
||||
|
||||
2
.travis/osx..before_install.sh
Normal file → Executable file
2
.travis/osx..before_install.sh
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
brew update
|
||||
|
||||
34
.travis/osx..install.sh
Normal file → Executable file
34
.travis/osx..install.sh
Normal file → Executable file
@@ -1,20 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGES="cmake pkgconfig fftw libogg libvorbis libsndfile libsamplerate jack sdl stk portaudio node fltk"
|
||||
set -e
|
||||
|
||||
PACKAGES="cmake pkg-config fftw libogg libvorbis libsndfile libsamplerate jack sdl stk portaudio node fltk"
|
||||
|
||||
if [ "$QT5" ]; then
|
||||
PACKAGES="$PACKAGES homebrew/versions/qt55"
|
||||
PACKAGES="$PACKAGES qt@5.5"
|
||||
else
|
||||
PACKAGES="$PACKAGES cartr/qt4/qt"
|
||||
PACKAGES="$PACKAGES cartr/qt4/qt@4"
|
||||
fi
|
||||
|
||||
if "${TRAVIS}"; then
|
||||
PACKAGES="$PACKAGES ccache"
|
||||
fi
|
||||
|
||||
# removing already installed packages from the list
|
||||
for p in $(brew list); do
|
||||
PACKAGES=${PACKAGES//$p/}
|
||||
done;
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
brew install $PACKAGES ccache
|
||||
brew install $PACKAGES
|
||||
|
||||
# Recompile fluid-synth without CoreAudio per issues #649
|
||||
# Changes to fluid-synth.rb must be pushed to URL prior to use
|
||||
url=$(git remote get-url origin)
|
||||
branch=$(git symbolic-ref --short HEAD)
|
||||
brew install --build-from-source "$url/raw/$branch/cmake/apple/fluid-synth.rb"
|
||||
if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
|
||||
slug=$TRAVIS_PULL_REQUEST_SLUG
|
||||
branch=$TRAVIS_PULL_REQUEST_BRANCH
|
||||
elif "${TRAVIS}"; then
|
||||
slug=$TRAVIS_REPO_SLUG
|
||||
branch=$TRAVIS_BRANCH
|
||||
else
|
||||
slug="LMMS/lmms"
|
||||
branch=$(git symbolic-ref --short HEAD)
|
||||
fi
|
||||
|
||||
brew install --build-from-source "https://raw.githubusercontent.com/${slug}/${branch}/cmake/apple/fluid-synth.rb"
|
||||
|
||||
sudo npm install -g appdmg
|
||||
|
||||
2
.travis/osx..script.sh
Normal file → Executable file
2
.travis/osx..script.sh
Normal file → Executable file
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$QT5" ]; then
|
||||
# Workaround; No FindQt5.cmake module exists
|
||||
CMAKE_PREFIX_PATH="$(brew --prefix qt55)"
|
||||
|
||||
31
.travis/script.sh
Executable file
31
.travis/script.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$TYPE" = 'style' ]; then
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
shellcheck $(find -O3 "$TRAVIS_BUILD_DIR/.travis/" "$TRAVIS_BUILD_DIR/cmake/" -type f -name '*.sh' -o -name "*.sh.in")
|
||||
|
||||
else
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
||||
|
||||
if [ -z "$TRAVIS_TAG" ]; then
|
||||
export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON"
|
||||
fi
|
||||
|
||||
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.script.sh"
|
||||
|
||||
make -j4
|
||||
|
||||
if [[ $TARGET_OS != win* ]]; then
|
||||
|
||||
make tests
|
||||
tests/tests
|
||||
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user