mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 14:53:45 +01:00
Travis: Only trigger a compile, when C/C++ related files were touched (#4284)
This commit is contained in:
parent
9a3129da5e
commit
adad6e0a1c
@ -1,4 +1,8 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
echo "Preparing for $TRAVIS_COMMIT_RANGE"
|
||||||
|
. util/travis/common.sh
|
||||||
|
|
||||||
|
needs_compile || exit 0
|
||||||
|
|
||||||
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
8
util/travis/common.sh
Normal file
8
util/travis/common.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
# Relative to git-repository root:
|
||||||
|
TRIGGER_COMPILE_PATHS="src/|CMakeLists.txt|cmake/Modules/|util/travis/|util/buildbot/"
|
||||||
|
|
||||||
|
needs_compile() {
|
||||||
|
git diff --name-only $TRAVIS_COMMIT_RANGE | egrep -q "^($TRIGGER_COMPILE_PATHS)"
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
. util/travis/common.sh
|
||||||
|
|
||||||
|
needs_compile || exit 0
|
||||||
|
|
||||||
if [[ $PLATFORM == "Unix" ]]; then
|
if [[ $PLATFORM == "Unix" ]]; then
|
||||||
mkdir -p travisbuild
|
mkdir -p travisbuild
|
||||||
|
Loading…
Reference in New Issue
Block a user