summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-09-16 16:21:00 +0100
committerGitHub <noreply@github.com>2022-09-16 16:21:00 +0100
commit71071360e1d4cbf2b615c2f593f8d049606e6122 (patch)
tree7891db05e3fdcaca993ff6ac6bc3e3c143826cf8
parent22f382539d78f69aa91721ad62bbd7229750a043 (diff)
parentebb0830c65b97b971f5e2bc80647f7386d3e88df (diff)
downloadlibgit2-71071360e1d4cbf2b615c2f593f8d049606e6122.tar.gz
Merge pull request #6403 from libgit2/ethomson/ci
CI Improvements
-rw-r--r--.github/workflows/benchmark.yml2
-rw-r--r--.github/workflows/main.yml4
-rw-r--r--.github/workflows/nightly.yml2
-rwxr-xr-xci/test.sh35
4 files changed, 29 insertions, 14 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 285c273b1..df80d7513 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -27,7 +27,7 @@ jobs:
os: ubuntu-latest
setup-script: ubuntu
- name: "macOS"
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI=ON -DCMAKE_BUILD_TYPE=Release
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ce14dd0fb..ec1c828d6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -122,7 +122,7 @@ jobs:
os: ubuntu-latest
- name: "macOS"
id: macos
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
@@ -230,7 +230,7 @@ jobs:
os: ubuntu-latest
- name: "macOS (SHA256)"
id: macos
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 856da28a3..fe223db76 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -154,7 +154,7 @@ jobs:
SKIP_SSH_TESTS: true
os: ubuntu-latest
- name: "macOS"
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
diff --git a/ci/test.sh b/ci/test.sh
index 0815522a9..9e5ff9a3e 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -27,8 +27,23 @@ cleanup() {
kill $GITDAEMON_PID
fi
+ if [ ! -z "$PROXY_BASIC_PID" ]; then
+ echo "Stopping proxy (Basic)..."
+ kill $PROXY_BASIC_PID
+ fi
+
+ if [ ! -z "$PROXY_NTLM_PID" ]; then
+ echo "Stopping proxy (NTLM)..."
+ kill $PROXY_NTLM_PID
+ fi
+
+ if [ ! -z "$HTTP_PID" ]; then
+ echo "Stopping HTTP server..."
+ kill $HTTP_PID
+ fi
+
if [ ! -z "$SSHD_DIR" -a -f "${SSHD_DIR}/pid" ]; then
- echo "Stopping SSH..."
+ echo "Stopping SSH server..."
kill $(cat "${SSHD_DIR}/pid")
fi
@@ -80,40 +95,40 @@ echo "##########################################################################
echo "## Configuring test environment"
echo "##############################################################################"
+echo ""
+
if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
echo "Starting git daemon..."
GITDAEMON_DIR=`mktemp -d ${TMPDIR}/gitdaemon.XXXXXXXX`
git init --bare "${GITDAEMON_DIR}/test.git" >/dev/null
git daemon --listen=localhost --export-all --enable=receive-pack --base-path="${GITDAEMON_DIR}" "${GITDAEMON_DIR}" 2>/dev/null &
GITDAEMON_PID=$!
- disown $GITDAEMON_PID
fi
if [ -z "$SKIP_PROXY_TESTS" ]; then
curl --location --silent --show-error https://github.com/ethomson/poxyproxy/releases/download/v0.7.0/poxyproxy-0.7.0.jar >poxyproxy.jar
- echo ""
echo "Starting HTTP proxy (Basic)..."
java -jar poxyproxy.jar --address 127.0.0.1 --port 8080 --credentials foo:bar --auth-type basic --quiet &
+ PROXY_BASIC_PID=$!
- echo ""
echo "Starting HTTP proxy (NTLM)..."
java -jar poxyproxy.jar --address 127.0.0.1 --port 8090 --credentials foo:bar --auth-type ntlm --quiet &
+ PROXY_NTLM_PID=$!
fi
if [ -z "$SKIP_NTLM_TESTS" -o -z "$SKIP_ONLINE_TESTS" ]; then
curl --location --silent --show-error https://github.com/ethomson/poxygit/releases/download/v0.5.1/poxygit-0.5.1.jar >poxygit.jar
- echo ""
echo "Starting HTTP server..."
- NTLM_DIR=`mktemp -d ${TMPDIR}/ntlm.XXXXXXXX`
- git init --bare "${NTLM_DIR}/test.git"
- java -jar poxygit.jar --address 127.0.0.1 --port 9000 --credentials foo:baz --quiet "${NTLM_DIR}" &
+ HTTP_DIR=`mktemp -d ${TMPDIR}/http.XXXXXXXX`
+ git init --bare "${HTTP_DIR}/test.git"
+ java -jar poxygit.jar --address 127.0.0.1 --port 9000 --credentials foo:baz --quiet "${HTTP_DIR}" &
+ HTTP_PID=$!
fi
if [ -z "$SKIP_SSH_TESTS" ]; then
- echo ""
- echo "Starting ssh daemon..."
+ echo "Starting SSH server..."
HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`
git init --bare "${SSHD_DIR}/test.git" >/dev/null