Skip to content

Commit 54bfab9

Browse files
authored
Merge pull request #6751 from libgit2/ethomson/ci
2 parents 4ab9c40 + 038f078 commit 54bfab9

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/actions/run-build/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ runs:
4040
-e PKG_CONFIG_PATH \
4141
-e SKIP_NEGOTIATE_TESTS \
4242
-e SKIP_SSH_TESTS \
43+
-e SKIP_PUSHOPTIONS_TESTS \
4344
-e TSAN_OPTIONS \
4445
-e UBSAN_OPTIONS \
4546
${{ inputs.container-version }} \

.github/workflows/nightly.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ jobs:
178178
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
179179
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
180180
SKIP_NEGOTIATE_TESTS: true
181+
SKIP_PUSHOPTIONS_TESTS: true
181182
- name: "Linux (CentOS 7, dynamically-loaded OpenSSL)"
182183
id: centos7-dynamicopenssl
183184
os: ubuntu-latest
@@ -187,6 +188,7 @@ jobs:
187188
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
188189
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
189190
SKIP_NEGOTIATE_TESTS: true
191+
SKIP_PUSHOPTIONS_TESTS: true
190192
- name: "Linux (CentOS 8, OpenSSL)"
191193
id: centos8-openssl
192194
os: ubuntu-latest
@@ -218,6 +220,7 @@ jobs:
218220
CMAKE_GENERATOR: Ninja
219221
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL-Dynamic -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
220222
RUN_INVASIVE_TESTS: true
223+
SKIP_PUSHOPTIONS_TESTS: true
221224
os: ubuntu-latest
222225
- name: "Linux (x86, Bionic, Clang, OpenSSL)"
223226
container:
@@ -229,6 +232,7 @@ jobs:
229232
CMAKE_GENERATOR: Ninja
230233
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
231234
RUN_INVASIVE_TESTS: true
235+
SKIP_PUSHOPTIONS_TESTS: true
232236
os: ubuntu-latest
233237
- name: "Linux (x86, Bionic, GCC, OpenSSL)"
234238
container:
@@ -239,6 +243,7 @@ jobs:
239243
CMAKE_GENERATOR: Ninja
240244
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
241245
RUN_INVASIVE_TESTS: true
246+
SKIP_PUSHOPTIONS_TESTS: true
242247
os: ubuntu-latest
243248
- name: "Linux (arm32, Bionic, GCC, OpenSSL)"
244249
container:
@@ -251,6 +256,7 @@ jobs:
251256
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DUSE_SSH=ON
252257
RUN_INVASIVE_TESTS: true
253258
SKIP_PROXY_TESTS: true
259+
SKIP_PUSHOPTIONS_TESTS: true
254260
GITTEST_FLAKY_STAT: true
255261
os: ubuntu-latest
256262
- name: "Linux (arm64, Bionic, GCC, OpenSSL)"
@@ -264,6 +270,7 @@ jobs:
264270
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DUSE_SSH=ON
265271
RUN_INVASIVE_TESTS: true
266272
SKIP_PROXY_TESTS: true
273+
SKIP_PUSHOPTIONS_TESTS: true
267274
os: ubuntu-latest
268275

269276
# Nightly builds: ensure we fallback when missing core functionality
@@ -276,6 +283,7 @@ jobs:
276283
CC: gcc
277284
CMAKE_OPTIONS: -DTHREADSAFE=OFF -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
278285
CMAKE_GENERATOR: Ninja
286+
SKIP_PUSHOPTIONS_TESTS: true
279287
- name: "Linux (no mmap)"
280288
id: noble-nommap
281289
os: ubuntu-latest

ci/test.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if [[ "$(uname -s)" == MINGW* ]]; then
1818
SKIP_NTLM_TESTS=1
1919
fi
2020

21+
# older versions of git don't support push options
22+
if [ -z "$SKIP_PUSHOPTIONS_TESTS" ]; then
23+
export GITTEST_PUSH_OPTIONS=true
24+
fi
25+
2126
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
2227
BUILD_DIR=$(pwd)
2328
BUILD_PATH=${BUILD_PATH:=$PATH}
@@ -207,7 +212,6 @@ if should_run "SSH_TESTS"; then
207212
echo "Starting SSH server..."
208213
SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`
209214
cp -R "${SOURCE_DIR}/tests/resources/pushoptions.git" "${SSHD_DIR}/test.git"
210-
ls -FlasR "${SSHD_DIR}"
211215
212216
cat >"${SSHD_DIR}/sshd_config" <<-EOF
213217
Port 2222
@@ -325,10 +329,8 @@ if should_run "GITDAEMON_TESTS"; then
325329
echo ""
326330
327331
export GITTEST_REMOTE_URL="git://localhost/test.git"
328-
export GITTEST_PUSH_OPTIONS=true
329332
run_test gitdaemon
330333
unset GITTEST_REMOTE_URL
331-
unset GITTEST_PUSH_OPTIONS
332334
333335
echo ""
334336
echo "Running gitdaemon (namespace) tests"
@@ -383,12 +385,10 @@ if should_run "NTLM_TESTS"; then
383385
export GITTEST_REMOTE_URL="http://localhost:9000/ntlm/test.git"
384386
export GITTEST_REMOTE_USER="foo"
385387
export GITTEST_REMOTE_PASS="baz"
386-
export GITTEST_PUSH_OPTIONS=true
387388
run_test auth_clone_and_push
388389
unset GITTEST_REMOTE_URL
389390
unset GITTEST_REMOTE_USER
390391
unset GITTEST_REMOTE_PASS
391-
unset GITTEST_PUSH_OPTIONS
392392
393393
echo ""
394394
echo "Running NTLM tests (Apache emulation)"
@@ -397,12 +397,10 @@ if should_run "NTLM_TESTS"; then
397397
export GITTEST_REMOTE_URL="http://localhost:9000/broken-ntlm/test.git"
398398
export GITTEST_REMOTE_USER="foo"
399399
export GITTEST_REMOTE_PASS="baz"
400-
export GITTEST_PUSH_OPTIONS=true
401400
run_test auth_clone_and_push
402401
unset GITTEST_REMOTE_URL
403402
unset GITTEST_REMOTE_USER
404403
unset GITTEST_REMOTE_PASS
405-
unset GITTEST_PUSH_OPTIONS
406404
fi
407405
408406
if should_run "NEGOTIATE_TESTS" && -n "$GITTEST_NEGOTIATE_PASSWORD" ; then
@@ -452,20 +450,16 @@ if should_run "SSH_TESTS"; then
452450
echo ""
453451
454452
export GITTEST_REMOTE_URL="ssh://localhost:2222/$SSHD_DIR/test.git"
455-
export GITTEST_PUSH_OPTIONS=true
456453
run_test ssh
457454
unset GITTEST_REMOTE_URL
458-
unset GITTEST_PUSH_OPTIONS
459455
460456
echo ""
461457
echo "Running ssh tests (scp-style paths)"
462458
echo ""
463459
464460
export GITTEST_REMOTE_URL="[localhost:2222]:$SSHD_DIR/test.git"
465-
export GITTEST_PUSH_OPTIONS=true
466461
run_test ssh
467462
unset GITTEST_REMOTE_URL
468-
unset GITTEST_PUSH_OPTIONS
469463
470464
unset GITTEST_SSH_CMD
471465

0 commit comments

Comments
 (0)