Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cea7d7d

Browse files
authored
Merge pull request LMMS#3476 from zapashcanon/shellcheck
Add shellcheck to the build
2 parents 5e58d3c + 7844b3e commit cea7d7d

18 files changed

+127
-57
lines changed

.travis.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cache:
88
- $HOME/.ccache
99
matrix:
1010
include:
11+
- env: TYPE=style
1112
- env: TARGET_OS=win32
1213
- env: TARGET_OS=win64
1314
- os: osx
@@ -17,20 +18,9 @@ matrix:
1718
- env: QT5=True TARGET_OS=win64
1819
- os: osx
1920
env: QT5=True
20-
before_install:
21-
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
22-
install:
23-
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
24-
before_script:
25-
- mkdir build && cd build
26-
- export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
27-
- if [ -z "$TRAVIS_TAG" ]; then export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON"; fi
28-
script:
29-
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
30-
- make -j4
31-
- if [[ $TARGET_OS != win* ]]; then make tests && ./tests/tests; fi;
32-
after_script:
33-
- ccache -s
21+
install: ${TRAVIS_BUILD_DIR}/.travis/install.sh
22+
script: ${TRAVIS_BUILD_DIR}/.travis/script.sh
23+
after_script: ${TRAVIS_BUILD_DIR}/.travis/after_script.sh
3424
before_deploy: make package
3525
deploy:
3626
provider: releases
@@ -43,10 +33,3 @@ deploy:
4333
all_branches: true
4434
condition: '("$TARGET_OS" = win??) && "$QT5"'
4535
repo: LMMS/lmms
46-
notifications:
47-
webhooks:
48-
urls:
49-
- https://webhooks.gitter.im/e/1ac7fc698195981a9227
50-
on_success: change # options: [always|never|change] default: always
51-
on_failure: always # options: [always|never|change] default: always
52-
on_start: never # options: [always|never|change] default: always

.travis/after_script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ "$TYPE" != 'style' ]; then
6+
ccache -s
7+
fi

.travis/install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ "$TYPE" = 'style' ]; then
6+
sudo apt-get -yqq update
7+
sudo apt-get install shellcheck
8+
else
9+
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.before_install.sh"
10+
"$TRAVIS_BUILD_DIR/.travis/$TRAVIS_OS_NAME.$TARGET_OS.install.sh"
11+
fi

.travis/linux..before_install.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
sudo add-apt-repository ppa:andrewrk/libgroove -y
46
sudo sed -e "s/trusty/precise/" -i \
57
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list

.travis/linux..install.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev
46
libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev
57
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev

.travis/linux..script.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
# shellcheck disable=SC2086
46
cmake -DUSE_WERROR=ON $CMAKE_FLAGS ..

.travis/linux.win.download.sh

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
23
set -e
34

45
CACHE_DIR=$TRAVIS_BUILD_DIR/apt_mingw_cache/$1

.travis/linux.win32.before_install.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
sudo add-apt-repository ppa:tobydox/mingw-x-trusty -y
46
sudo apt-get update -qq

.travis/linux.win32.install.sh

100644100755
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
23
set -e
34

45
if [ "$QT5" ]; then
@@ -15,10 +16,7 @@ MINGW_PACKAGES="mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x
1516

1617
export MINGW_PACKAGES
1718

18-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
19-
20-
# shellcheck disable=SC1090
21-
. "$DIR/linux.win.download.sh" win32
19+
"$TRAVIS_BUILD_DIR/.travis/linux.win.download.sh" win32
2220

2321
PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32 $MINGW_PACKAGES"
2422

@@ -29,6 +27,6 @@ sudo apt-get install -y $PACKAGES
2927
# to use @file command line passing, which in turn ccache 3.1.9 doesn't support
3028
pushd /tmp
3129
wget http://archive.ubuntu.com/ubuntu/pool/main/c/ccache/ccache_3.2.4-1_amd64.deb
32-
sha256sum -c $TRAVIS_BUILD_DIR/.travis/ccache.sha256
30+
sha256sum -c "$TRAVIS_BUILD_DIR/.travis/ccache.sha256"
3331
sudo dpkg -i ccache_3.2.4-1_amd64.deb
3432
popd

.travis/linux.win32.script.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
export CMAKE_OPTS="$CMAKE_FLAGS -DUSE_WERROR=ON"
46
../cmake/build_mingw32.sh

0 commit comments

Comments
 (0)