]> git.proxmox.com Git - libgit2.git/blame - script/cibuild.sh
Merge pull request #2625 from libgit2/cmn/ssl-tls
[libgit2.git] / script / cibuild.sh
CommitLineData
5be622fb
CMN
1#!/bin/sh
2
039e354b 3if [ -n "$COVERITY" ];
9bf17d2c
BS
4then
5 ./script/coverity.sh;
6 exit $?;
7fi
8
5be622fb
CMN
9# Create a test repo which we can use for the online::push tests
10mkdir $HOME/_temp
11git init --bare $HOME/_temp/test.git
12git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &
13export GITTEST_REMOTE_URL="git://localhost/test.git"
14
15mkdir _build
16cd _build
5875e8d2 17cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $?
ebda0970 18make -j2 install || exit $?
5875e8d2 19ctest -V . || exit $?
5be622fb
CMN
20
21# Now that we've tested the raw git protocol, let's set up ssh to we
22# can do the push tests over it
23
24killall git-daemon
87339935
CMN
25
26if [ "$TRAVIS_OS_NAME" = "osx" ]; then
27 echo 'PasswordAuthentication yes' | sudo tee -a /etc/sshd_config
28else
29 sudo start ssh
30fi
31
5be622fb
CMN
32ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q
33cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
34ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts
35
bf8756d6
CMN
36# Get the fingerprint for localhost and remove the colons so we can parse it as a hex number
37export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
38
5be622fb
CMN
39export GITTEST_REMOTE_URL="ssh://localhost/$HOME/_temp/test.git"
40export GITTEST_REMOTE_USER=$USER
41export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa"
42export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub"
43export GITTEST_REMOTE_SSH_PASSPHRASE=""
44
45if [ -e ./libgit2_clar ]; then
bf8756d6 46 ./libgit2_clar -sonline::push -sonline::clone::cred_callback -sonline::clone::ssh_cert &&
d4256ed5 47 ./libgit2_clar -sonline::clone::ssh_with_paths
5be622fb 48fi