CI: remove Travis CI support

Remove support for running the CI in travis. The last builds in it are from 5 months ago[1] (as of 2021-11-19), and our documentation has referred to GitHub CI instead since f003a91f5c5 (SubmittingPatches: replace discussion of Travis with GitHub Actions, 2021-07-22). We'll now run the "t9810 t9816" and tests on OSX. We didn't before, as we'd carried the Travis exclusion of them forward from 522354d70f4 (Add Travis CI support, 2015-11-27). Let's hope whatever issue there was with them was either Travis specific, or fixed since then (I'm not sure). The "apt-add-repository" invocation (which we were doing in GitHub CI) isn't needed, it was another Travis-only case that was carried forward into more general code. See 0f0c51181df (travis-ci: install packages in 'ci/install-dependencies.sh', 2018-11-01). Remove the "linux-gcc-4.8" job added in fb9d7431cf4 (travis-ci: build with GCC 4.8 as well, 2019-07-18), it only ran in Travis CI. 1. https://travis-ci.org/github/git/git/builds Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Nov 23, 2021 at 17:29 UTC 4a6e4b9602630d50eb9d630c721bb01df97049f9
7 files changed +7 -118
.travis.yml deleted
-60
@@ -1,60 +0,0 @@
1 -language: c
2 -
3 -cache:
4 - directories:
5 - - $HOME/travis-cache
6 -
7 -os:
8 - - linux
9 - - osx
10 -
11 -osx_image: xcode10.1
12 -
13 -compiler:
14 - - clang
15 - - gcc
16 -
17 -matrix:
18 - include:
19 - - env: jobname=linux-gcc-default
20 - os: linux
21 - compiler:
22 - addons:
23 - before_install:
24 - - env: jobname=linux-gcc-4.8
25 - os: linux
26 - dist: trusty
27 - compiler:
28 - - env: jobname=Linux32
29 - os: linux
30 - compiler:
31 - addons:
32 - services:
33 - - docker
34 - before_install:
35 - script: ci/run-docker.sh
36 - - env: jobname=linux-musl
37 - os: linux
38 - compiler:
39 - addons:
40 - services:
41 - - docker
42 - before_install:
43 - script: ci/run-docker.sh
44 - - env: jobname=StaticAnalysis
45 - os: linux
46 - compiler:
47 - script: ci/run-static-analysis.sh
48 - after_failure:
49 - - env: jobname=Documentation
50 - os: linux
51 - compiler:
52 - script: ci/test-documentation.sh
53 - after_failure:
54 -
55 -before_install: ci/install-dependencies.sh
56 -script: ci/run-build-and-tests.sh
57 -after_failure: ci/print-test-failures.sh
58 -
59 -notifications:
60 - email: false
ci/install-dependencies.sh
+1 -2
@@ -13,7 +13,6 @@ UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
13
14 case "$jobname" in
15 linux-clang|linux-gcc|linux-leaks)
16 - sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
16 sudo apt-get -q update
17 sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \
18 $UBUNTU_COMMON_PKGS
@@ -77,7 +76,7 @@ Documentation)
76 test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
77 sudo gem install --version 1.5.8 asciidoctor
78 ;;
80 -linux-gcc-default|linux-gcc-4.8)
79 +linux-gcc-default)
80 sudo apt-get -q update
81 sudo apt-get -q -y install $UBUNTU_COMMON_PKGS
82 ;;
ci/lib.sh
+3 -34
@@ -34,7 +34,7 @@ save_good_tree () {
34 # successfully before (e.g. because the branch got rebased, changing only
35 # the commit messages).
36 skip_good_tree () {
37 - if test "$TRAVIS_DEBUG_MODE" = true || test true = "$GITHUB_ACTIONS"
37 + if test true = "$GITHUB_ACTIONS"
38 then
39 return
40 fi
@@ -60,7 +60,7 @@ skip_good_tree () {
60 cat <<-EOF
61 $(tput setaf 2)Skipping build job for commit $CI_COMMIT.$(tput sgr0)
62 This commit's tree has already been built and tested successfully in build job $prev_good_job_number for commit $prev_good_commit.
63 - The log of that build job is available at $(url_for_job_id $prev_good_job_id)
63 + The log of that build job is available at $SYSTEM_TASKDEFINITIONSURI$SYSTEM_TEAMPROJECT/_build/results?buildId=$prev_good_job_id
64 To force a re-build delete the branch's cache and then hit 'Restart job'.
65 EOF
66 fi
@@ -91,29 +91,7 @@ export MAKEFLAGS=
91 # and installing dependencies.
92 set -ex
93
94 -if test true = "$TRAVIS"
95 -then
96 - CI_TYPE=travis
97 - # When building a PR, TRAVIS_BRANCH refers to the *target* branch. Not
98 - # what we want here. We want the source branch instead.
99 - CI_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
100 - CI_COMMIT="$TRAVIS_COMMIT"
101 - CI_JOB_ID="$TRAVIS_JOB_ID"
102 - CI_JOB_NUMBER="$TRAVIS_JOB_NUMBER"
103 - CI_OS_NAME="$TRAVIS_OS_NAME"
104 - CI_REPO_SLUG="$TRAVIS_REPO_SLUG"
105 -
106 - cache_dir="$HOME/travis-cache"
107 -
108 - url_for_job_id () {
109 - echo "https://travis-ci.org/$CI_REPO_SLUG/jobs/$1"
110 - }
111 -
112 - BREW_INSTALL_PACKAGES="git-lfs gettext"
113 - export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
114 - export GIT_TEST_OPTS="--verbose-log -x --immediate"
115 - MAKEFLAGS="$MAKEFLAGS --jobs=2"
116 -elif test -n "$SYSTEM_COLLECTIONURI" || test -n "$SYSTEM_TASKDEFINITIONSURI"
94 +if test -n "$SYSTEM_COLLECTIONURI" || test -n "$SYSTEM_TASKDEFINITIONSURI"
95 then
96 CI_TYPE=azure-pipelines
97 # We are running in Azure Pipelines
@@ -130,10 +108,6 @@ then
108 # among *all* phases)
109 cache_dir="$HOME/test-cache/$SYSTEM_PHASENAME"
110
133 - url_for_job_id () {
134 - echo "$SYSTEM_TASKDEFINITIONSURI$SYSTEM_TEAMPROJECT/_build/results?buildId=$1"
135 - }
136 -
111 export GIT_PROVE_OPTS="--timer --jobs 10 --state=failed,slow,save"
112 export GIT_TEST_OPTS="--verbose-log -x --write-junit-xml"
113 MAKEFLAGS="$MAKEFLAGS --jobs=10"
@@ -214,11 +188,6 @@ osx-clang|osx-gcc)
188 else
189 MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
190 fi
217 -
218 - # t9810 occasionally fails on Travis CI OS X
219 - # t9816 occasionally fails with "TAP out of sequence errors" on
220 - # Travis CI OS X
221 - export GIT_SKIP_TESTS="t9810 t9816"
191 ;;
192 linux-gcc-default)
193 ;;
ci/print-test-failures.sh
-10
@@ -39,8 +39,6 @@ do
39 test_name="${test_name##*/}"
40 trash_dir="trash directory.$test_name"
41 case "$CI_TYPE" in
42 - travis)
43 - ;;
42 azure-pipelines)
43 mkdir -p failed-test-artifacts
44 mv "$trash_dir" failed-test-artifacts
@@ -88,11 +86,3 @@ do
86 fi
87 fi
88 done
91 -
92 -if [ $combined_trash_size -gt 0 ]
93 -then
94 - echo "------------------------------------------------------------------------"
95 - echo "Trash directories embedded in this log can be extracted by running:"
96 - echo
97 - echo " curl https://api.travis-ci.org/v3/job/$TRAVIS_JOB_ID/log.txt |./ci/util/extract-trash-dirs.sh"
98 -fi
ci/run-build-and-tests.sh
+2 -2
@@ -41,9 +41,9 @@ linux-clang)
41 export GIT_TEST_DEFAULT_HASH=sha256
42 make test
43 ;;
44 -linux-gcc-4.8|pedantic)
44 +pedantic)
45 # Don't run the tests; we only care about whether Git can be
46 - # built with GCC 4.8 or with pedantic
46 + # built.
47 ;;
48 *)
49 make test
ci/run-docker-build.sh
-9
@@ -47,15 +47,6 @@ else
47 else
48 useradd -u $HOST_UID $CI_USER
49 fi
50 -
51 - # Due to a bug the test suite was run as root in the past, so
52 - # a prove state file created back then is only accessible by
53 - # root. Now that bug is fixed, the test suite is run as a
54 - # regular user, but the prove state file coming from Travis
55 - # CI's cache might still be owned by root.
56 - # Make sure that this user has rights to any cached files,
57 - # including an existing prove state file.
58 - test -n "$cache_dir" && chown -R $HOST_UID:$HOST_UID "$cache_dir"
50 fi
51
52 # Build and test
ci/run-docker.sh
+1 -1
@@ -25,7 +25,7 @@ docker pull "$CI_CONTAINER"
25 # root@container:/# export jobname=<jobname>
26 # root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>
27
28 -container_cache_dir=/tmp/travis-cache
28 +container_cache_dir=/tmp/container-cache
29
30 docker run \
31 --interactive \