summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/appveyor-mingw.sh23
-rwxr-xr-xscript/cibuild.sh87
-rwxr-xr-xscript/coverity.sh71
-rwxr-xr-xscript/install-deps-osx.sh9
4 files changed, 13 insertions, 177 deletions
diff --git a/script/appveyor-mingw.sh b/script/appveyor-mingw.sh
deleted file mode 100755
index d171a72d5..000000000
--- a/script/appveyor-mingw.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -e
-cd `dirname "$0"`/..
-if [ "$ARCH" = "i686" ]; then
- f=i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
- if ! [ -e $f ]; then
- curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/$f
- fi
- 7z x $f > /dev/null
- export PATH=`pwd`/mingw32/bin:$PATH
-else
- f=x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z
- if ! [ -e $f ]; then
- curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/$f
- fi
- 7z x $f > /dev/null
- export PATH=`pwd`/mingw64/bin:$PATH
-fi
-cd build
-gcc --version
-cmake --version
-cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$GENERATOR"
-cmake --build . --config RelWithDebInfo
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 403df223e..c062c112e 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -2,87 +2,26 @@
set -x
-if [ -n "$COVERITY" ];
-then
- ./script/coverity.sh;
- exit $?;
+if [ -n "$COVERITY" ]; then
+ ./script/coverity.sh
+ exit $?
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PKG_CONFIG_PATH=$(ls -d /usr/local/Cellar/{curl,zlib}/*/lib/pkgconfig | paste -s -d':' -)
-fi
-# Should we ask Travis to cache this file?
-curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar >poxyproxy.jar || exit $?
-# Run this early so we know it's ready by the time we need it
-java -jar poxyproxy.jar -d --port 8080 --credentials foo:bar &
+ # Set up a ramdisk for us to put our test data on to speed up tests on macOS
+ export CLAR_TMP="$HOME"/_clar_tmp
+ mkdir -p $CLAR_TMP
+
+ # 5*2M sectors aka ~5GB of space
+ device=$(hdiutil attach -nomount ram://$((5 * 2 * 1024 * 1024)))
+ newfs_hfs $device
+ mount -t hfs $device $CLAR_TMP
+fi
mkdir _build
cd _build
# shellcheck disable=SC2086
cmake .. -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $?
-make -j2 install || exit $?
-
-# If this platform doesn't support test execution, bail out now
-if [ -n "$SKIP_TESTS" ];
-then
- exit $?;
-fi
-
-# Create a test repo which we can use for the online::push tests
-mkdir "$HOME"/_temp
-git init --bare "$HOME"/_temp/test.git
-git daemon --listen=localhost --export-all --enable=receive-pack --base-path="$HOME"/_temp "$HOME"/_temp 2>/dev/null &
-export GITTEST_REMOTE_URL="git://localhost/test.git"
-
-# Run the test suite
-ctest -V -R libgit2_clar || exit $?
-
-# Now that we've tested the raw git protocol, let's set up ssh to we
-# can do the push tests over it
-
-killall git-daemon
-
-if [ "$TRAVIS_OS_NAME" = "osx" ]; then
- echo 'PasswordAuthentication yes' | sudo tee -a /etc/sshd_config
-fi
-
-ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q
-cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
-ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts
-
-# Get the fingerprint for localhost and remove the colons so we can parse it as
-# a hex number. The Mac version is newer so it has a different output format.
-if [ "$TRAVIS_OS_NAME" = "osx" ]; then
- export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -E md5 -F localhost -l | tail -n 1 | cut -d ' ' -f 3 | cut -d : -f2- | tr -d :)
-else
- export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
-fi
-
-export GITTEST_REMOTE_URL="ssh://localhost/$HOME/_temp/test.git"
-export GITTEST_REMOTE_USER=$USER
-export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa"
-export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub"
-export GITTEST_REMOTE_SSH_PASSPHRASE=""
-
-
-if [ -e ./libgit2_clar ]; then
- ./libgit2_clar -sonline::push -sonline::clone::ssh_cert &&
- ./libgit2_clar -sonline::clone::ssh_with_paths || exit $?
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- ./libgit2_clar -sonline::clone::cred_callback || exit $?
- fi
-
- # Use the proxy we started at the beginning
- export GITTEST_REMOTE_PROXY_URL="http://foo:bar@localhost:8080/"
- ./libgit2_clar -sonline::clone::proxy_credentials_in_url || exit $?
- export GITTEST_REMOTE_PROXY_URL="http://localhost:8080/"
- export GITTEST_REMOTE_PROXY_USER="foo"
- export GITTEST_REMOTE_PROXY_PASS="bar"
- ./libgit2_clar -sonline::clone::proxy_credentials_request || exit $?
-
-fi
-
-export GITTEST_REMOTE_URL="https://github.com/libgit2/non-existent"
-export GITTEST_REMOTE_USER="libgit2test"
-ctest -V -R libgit2_clar-cred_callback
+cmake --build . --target install || exit $?
diff --git a/script/coverity.sh b/script/coverity.sh
deleted file mode 100755
index 5fe16c031..000000000
--- a/script/coverity.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-set -e
-
-# Only run this on our branches
-echo "Branch: $TRAVIS_BRANCH | Pull request: $TRAVIS_PULL_REQUEST | Slug: $TRAVIS_REPO_SLUG"
-if [ "$TRAVIS_BRANCH" != "master" -o "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "libgit2/libgit2" ];
-then
- echo "Only analyzing the 'master' brach of the main repository."
- exit 0
-fi
-
-# Environment check
-[ -z "$COVERITY_TOKEN" ] && echo "Need to set a coverity token" && exit 1
-
-case $(uname -m) in
- i?86) BITS=32 ;;
- amd64|x86_64) BITS=64 ;;
-esac
-SCAN_TOOL=https://scan.coverity.com/download/cxx/linux${BITS}
-TOOL_BASE=$(pwd)/_coverity-scan
-
-# Install coverity tools
-if [ ! -d "$TOOL_BASE" ]; then
- echo "Downloading coverity..."
- mkdir -p "$TOOL_BASE"
- pushd "$TOOL_BASE"
- wget -O coverity_tool.tgz $SCAN_TOOL \
- --post-data "project=libgit2&token=$COVERITY_TOKEN"
- tar xzf coverity_tool.tgz
- popd
- TOOL_DIR=$(find "$TOOL_BASE" -type d -name 'cov-analysis*')
- ln -s "$TOOL_DIR" "$TOOL_BASE"/cov-analysis
-fi
-
-cp script/user_nodefs.h "$TOOL_BASE"/cov-analysis/config/user_nodefs.h
-
-COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build"
-
-# Configure and build
-rm -rf _build
-mkdir _build
-cd _build
-cmake .. -DTHREADSAFE=ON
-COVERITY_UNSUPPORTED=1 \
- $COV_BUILD --dir cov-int \
- cmake --build .
-
-# Upload results
-tar czf libgit2.tgz cov-int
-SHA=$(git rev-parse --short HEAD)
-
-HTML="$(curl \
- --silent \
- --write-out "\n%{http_code}" \
- --form token="$COVERITY_TOKEN" \
- --form email=bs@github.com \
- --form file=@libgit2.tgz \
- --form version="$SHA" \
- --form description="Travis build" \
- https://scan.coverity.com/builds?project=libgit2)"
-# Body is everything up to the last line
-BODY="$(echo "$HTML" | head -n-1)"
-# Status code is the last line
-STATUS_CODE="$(echo "$HTML" | tail -n1)"
-
-echo "${BODY}"
-
-if [ "${STATUS_CODE}" != "201" ]; then
- echo "Received error code ${STATUS_CODE} from Coverity"
- exit 1
-fi
diff --git a/script/install-deps-osx.sh b/script/install-deps-osx.sh
deleted file mode 100755
index 94314dbaa..000000000
--- a/script/install-deps-osx.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-set -x
-
-brew update
-brew install zlib
-brew install curl
-brew install openssl
-brew install libssh2