diff options
Diffstat (limited to 'misc/travis')
-rwxr-xr-x | misc/travis/android-tools-linux.sh | 108 | ||||
-rwxr-xr-x | misc/travis/black-format.sh | 48 | ||||
-rwxr-xr-x | misc/travis/ccache-osx.sh | 43 | ||||
-rwxr-xr-x | misc/travis/clang-format.sh | 48 |
4 files changed, 0 insertions, 247 deletions
diff --git a/misc/travis/android-tools-linux.sh b/misc/travis/android-tools-linux.sh deleted file mode 100755 index 6114551861..0000000000 --- a/misc/travis/android-tools-linux.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -# SDK -# https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -# SHA-256 444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 -# latest version available here: https://developer.android.com/studio/index.html - -# NDK -# https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip -# SHA-1 0bf02d4e8b85fd770fd7b9b2cdec57f9441f27a2 -# latest version available here: https://developer.android.com/ndk/downloads/index.html - -BASH_RC=~/.bashrc -GODOT_BUILD_TOOLS_PATH=./godot-dev/build-tools -mkdir -p $GODOT_BUILD_TOOLS_PATH -cd $GODOT_BUILD_TOOLS_PATH - -ANDROID_BASE_URL=http://dl.google.com/android/repository - -ANDROID_SDK_RELEASE=4333796 -ANDROID_SDK_DIR=android-sdk -ANDROID_SDK_FILENAME=sdk-tools-linux-$ANDROID_SDK_RELEASE.zip -ANDROID_SDK_URL=$ANDROID_BASE_URL/$ANDROID_SDK_FILENAME -ANDROID_SDK_PATH=$GODOT_BUILD_TOOLS_PATH/$ANDROID_SDK_DIR -ANDROID_SDK_SHA256=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 - -ANDROID_NDK_RELEASE=r21 -ANDROID_NDK_DIR=android-ndk -ANDROID_NDK_FILENAME=android-ndk-$ANDROID_NDK_RELEASE-linux-x86_64.zip -ANDROID_NDK_URL=$ANDROID_BASE_URL/$ANDROID_NDK_FILENAME -ANDROID_NDK_PATH=$GODOT_BUILD_TOOLS_PATH/$ANDROID_NDK_DIR -ANDROID_NDK_SHA1=afc9c0b9faad222898ac8168c78ad4ccac8a1b5c - -echo -echo "Download and install Android development tools ..." -echo - -if [ ! -e $ANDROID_SDK_FILENAME ]; then - echo "Downloading: Android SDK ..." - curl -L -O $ANDROID_SDK_URL -else - echo $ANDROID_SDK_SHA1 $ANDROID_SDK_FILENAME > $ANDROID_SDK_FILENAME.sha1 - if [ $(shasum -a 256 < $ANDROID_SDK_FILENAME | awk '{print $1;}') != $ANDROID_SDK_SHA1 ]; then - echo "Downloading: Android SDK ..." - curl -L -O $ANDROID_SDK_URL - fi -fi - -if [ ! -d $ANDROID_SDK_DIR ]; then - echo "Extracting: Android SDK ..." - unzip -qq $ANDROID_SDK_FILENAME -d $ANDROID_SDK_DIR - echo -fi - -if [ ! -e $ANDROID_NDK_FILENAME ]; then - echo "Downloading: Android NDK ..." - curl -L -O $ANDROID_NDK_URL -else - echo $ANDROID_NDK_MD5 $ANDROID_NDK_FILENAME > $ANDROID_NDK_FILENAME.md5 - if [ $(shasum -a 1 < $ANDROID_NDK_FILENAME | awk '{print $1;}') != $ANDROID_NDK_SHA1 ]; then - echo "Downloading: Android NDK ..." - curl -L -O $ANDROID_NDK_URL - fi -fi - -if [ ! -d $ANDROID_NDK_DIR ]; then - echo "Extracting: Android NDK ..." - unzip -qq $ANDROID_NDK_FILENAME - mv android-ndk-$ANDROID_NDK_RELEASE $ANDROID_NDK_DIR - echo -fi - -mkdir -p ~/.android && echo "count=0" > ~/.android/repositories.cfg -echo "Installing: Accepting Licenses ..." -yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager --licenses > /dev/null -echo "Installing: Android Build and Platform Tools ..." -yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'tools' > /dev/null -yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'platform-tools' > /dev/null -yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'build-tools;29.0.3' > /dev/null -echo - -EXPORT_VAL="export ANDROID_HOME=$ANDROID_SDK_PATH" -if ! grep -q "^$EXPORT_VAL" $BASH_RC; then - echo $EXPORT_VAL >> $BASH_RC -fi -#eval $EXPORT_VAL - -EXPORT_VAL="export ANDROID_NDK_ROOT=$ANDROID_NDK_PATH" -if ! grep -q "^$EXPORT_VAL" $BASH_RC; then - echo $EXPORT_VAL >> $BASH_RC -fi -#eval $EXPORT_VAL - -EXPORT_VAL="export PATH=$PATH:$ANDROID_SDK_PATH/tools" -if ! grep -q "^export PATH=.*$ANDROID_SDK_PATH/tools.*" $BASH_RC; then - echo $EXPORT_VAL >> $BASH_RC -fi -#eval $EXPORT_VAL - -EXPORT_VAL="export PATH=$PATH:$ANDROID_SDK_PATH/tools/bin" -if ! grep -q "^export PATH=.*$ANDROID_SDK_PATH/tools/bin.*" $BASH_RC; then - echo $EXPORT_VAL >> $BASH_RC -fi -#eval $EXPORT_VAL - -echo -echo "Done!" -echo diff --git a/misc/travis/black-format.sh b/misc/travis/black-format.sh deleted file mode 100755 index 75b153f6bb..0000000000 --- a/misc/travis/black-format.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -BLACK=black -BLACK_OPTIONS="-l 120" - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - # Travis only clones the PR branch and uses its HEAD commit as detached HEAD, - # so it's problematic when we want an exact commit range for format checks. - # We fetch upstream to ensure that we have the proper references to resolve. - # Ideally we would use $TRAVIS_COMMIT_RANGE but it doesn't play well with PR - # updates, as it only includes changes since the previous state of the PR. - if [ -z "$(git remote | grep upstream)" ]; then - git remote add upstream https://github.com/godotengine/godot \ - --no-tags -f -t $TRAVIS_BRANCH - fi - RANGE="upstream/$TRAVIS_BRANCH HEAD" -else - # Test only the last commit, since $TRAVIS_COMMIT_RANGE wouldn't support - # force pushes. - RANGE=HEAD -fi - -FILES=$(git diff-tree --no-commit-id --name-only -r $RANGE | grep -v thirdparty/| grep -E "(SConstruct|SCsub|\.py)$") -echo "Checking files:\n$FILES" - -# create a random filename to store our generated patch -prefix="static-check-black" -suffix="$(date +%s)" -patch="/tmp/$prefix-$suffix.patch" - -for file in $FILES; do - "$BLACK" "$BLACK_OPTIONS" --diff "$file" | \ - sed -e "1s|--- |--- a/|" -e "2s|+++ |+++ b/|" >> "$patch" -done - -# if no patch has been generated all is ok, clean up the file stub and exit -if [ ! -s "$patch" ] ; then - printf "Files in this commit comply with the black formatting rules.\n" - rm -f "$patch" - exit 0 -fi - -# a patch has been created, notify the user and exit -printf "\n*** The following differences were found between the code to commit " -printf "and the black formatting rules:\n\n" -pygmentize -l diff "$patch" -printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" -exit 1 diff --git a/misc/travis/ccache-osx.sh b/misc/travis/ccache-osx.sh deleted file mode 100755 index 5ce7a80cbc..0000000000 --- a/misc/travis/ccache-osx.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -echo -echo "Download and install ccache ..." -echo - -echo "Downloading sources ..." -curl -L -O https://www.samba.org/ftp/ccache/ccache-3.3.4.tar.gz # latest version available here: https://ccache.samba.org/download.html - -echo "Extracting to build directory ..." -tar xzf ccache-3.3.4.tar.gz -cd ccache-3.3.4 - -echo "Compiling sources ..." -./configure --prefix=/usr/local --with-bundled-zlib > /dev/null -make - -echo "Installing ..." - -mkdir /usr/local/opt/ccache - -mkdir /usr/local/opt/ccache/bin -cp ccache /usr/local/opt/ccache/bin -ln -s /usr/local/opt/ccache/bin/ccache /usr/local/bin/ccache - -mkdir /usr/local/opt/ccache/libexec -links=( - clang - clang++ - cc - gcc gcc2 gcc3 gcc-3.3 gcc-4.0 gcc-4.2 gcc-4.3 gcc-4.4 gcc-4.5 gcc-4.6 gcc-4.7 gcc-4.8 gcc-4.9 gcc-5 gcc-6 gcc-7 - c++ c++3 c++-3.3 c++-4.0 c++-4.2 c++-4.3 c++-4.4 c++-4.5 c++-4.6 c++-4.7 c++-4.8 c++-4.9 c++-5 c++-6 c++-7 - g++ g++2 g++3 g++-3.3 g++-4.0 g++-4.2 g++-4.3 g++-4.4 g++-4.5 g++-4.6 g++-4.7 g++-4.8 g++-4.9 g++-5 g++-6 g++-7 -) -for link in "${links[@]}"; do - ln -s ../bin/ccache /usr/local/opt/ccache/libexec/$link -done -#/usr/local/bin/ccache -M 2G -cd $TRAVIS_BUILD_DIR - -echo -echo "Done!" -echo diff --git a/misc/travis/clang-format.sh b/misc/travis/clang-format.sh deleted file mode 100755 index c917744ece..0000000000 --- a/misc/travis/clang-format.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -CLANG_FORMAT=clang-format-8 - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - # Travis only clones the PR branch and uses its HEAD commit as detached HEAD, - # so it's problematic when we want an exact commit range for format checks. - # We fetch upstream to ensure that we have the proper references to resolve. - # Ideally we would use $TRAVIS_COMMIT_RANGE but it doesn't play well with PR - # updates, as it only includes changes since the previous state of the PR. - if [ -z "$(git remote | grep upstream)" ]; then - git remote add upstream https://github.com/godotengine/godot \ - --no-tags -f -t $TRAVIS_BRANCH - fi - RANGE="upstream/$TRAVIS_BRANCH HEAD" -else - # Test only the last commit, since $TRAVIS_COMMIT_RANGE wouldn't support - # force pushes. - RANGE=HEAD -fi - -FILES=$(git diff-tree --no-commit-id --name-only -r $RANGE | grep -v thirdparty/ | grep -v platform/android/java/lib/src/com/ | grep -E "\.(c|h|cpp|hpp|cc|hh|cxx|m|mm|inc|java|glsl)$") -echo "Checking files:\n$FILES" - -# create a random filename to store our generated patch -prefix="static-check-clang-format" -suffix="$(date +%s)" -patch="/tmp/$prefix-$suffix.patch" - -for file in $FILES; do - "$CLANG_FORMAT" -style=file "$file" | \ - diff -u "$file" - | \ - sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch" -done - -# if no patch has been generated all is ok, clean up the file stub and exit -if [ ! -s "$patch" ] ; then - printf "Files in this commit comply with the clang-format rules.\n" - rm -f "$patch" - exit 0 -fi - -# a patch has been created, notify the user and exit -printf "\n*** The following differences were found between the code to commit " -printf "and the clang-format rules:\n\n" -pygmentize -l diff "$patch" -printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" -exit 1 |