Skip to content

Commit f9b889d

Browse files
committed
Merge branch 'ab/ci-updates'
Drop support for TravisCI and update test workflows at GitHub. * ab/ci-updates: CI: don't run "make test" twice in one job CI: use "$runs_on_pool", not "$jobname" to select packages & config CI: rename the "Linux32" job to lower-case "linux32" CI: use shorter names that fit in UX tooltips CI: remove Travis CI support
2 parents 250ca49 + 2571541 commit f9b889d

File tree

10 files changed

+72
-165
lines changed

10 files changed

+72
-165
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/PR
1+
name: CI
22

33
on: [push, pull_request]
44

@@ -7,6 +7,7 @@ env:
77

88
jobs:
99
ci-config:
10+
name: config
1011
runs-on: ubuntu-latest
1112
outputs:
1213
enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
@@ -77,6 +78,7 @@ jobs:
7778
}
7879
7980
windows-build:
81+
name: win build
8082
needs: ci-config
8183
if: needs.ci-config.outputs.enabled == 'yes'
8284
runs-on: windows-latest
@@ -97,6 +99,7 @@ jobs:
9799
name: windows-artifacts
98100
path: artifacts
99101
windows-test:
102+
name: win test
100103
runs-on: windows-latest
101104
needs: [windows-build]
102105
strategy:
@@ -127,6 +130,7 @@ jobs:
127130
name: failed-tests-windows
128131
path: ${{env.FAILED_TEST_ARTIFACTS}}
129132
vs-build:
133+
name: win+VS build
130134
needs: ci-config
131135
if: needs.ci-config.outputs.enabled == 'yes'
132136
env:
@@ -178,6 +182,7 @@ jobs:
178182
name: vs-artifacts
179183
path: artifacts
180184
vs-test:
185+
name: win+VS test
181186
runs-on: windows-latest
182187
needs: vs-build
183188
strategy:
@@ -210,6 +215,7 @@ jobs:
210215
name: failed-tests-windows
211216
path: ${{env.FAILED_TEST_ARTIFACTS}}
212217
regular:
218+
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
213219
needs: ci-config
214220
if: needs.ci-config.outputs.enabled == 'yes'
215221
strategy:
@@ -219,14 +225,25 @@ jobs:
219225
- jobname: linux-clang
220226
cc: clang
221227
pool: ubuntu-latest
228+
- jobname: linux-sha256
229+
cc: clang
230+
os: ubuntu
231+
pool: ubuntu-latest
222232
- jobname: linux-gcc
223233
cc: gcc
234+
cc_package: gcc-8
235+
pool: ubuntu-latest
236+
- jobname: linux-TEST-vars
237+
cc: gcc
238+
os: ubuntu
239+
cc_package: gcc-8
224240
pool: ubuntu-latest
225241
- jobname: osx-clang
226242
cc: clang
227243
pool: macos-latest
228244
- jobname: osx-gcc
229245
cc: gcc
246+
cc_package: gcc-9
230247
pool: macos-latest
231248
- jobname: linux-gcc-default
232249
cc: gcc
@@ -236,7 +253,9 @@ jobs:
236253
pool: ubuntu-latest
237254
env:
238255
CC: ${{matrix.vector.cc}}
256+
CC_PACKAGE: ${{matrix.vector.cc_package}}
239257
jobname: ${{matrix.vector.jobname}}
258+
runs_on_pool: ${{matrix.vector.pool}}
240259
runs-on: ${{matrix.vector.pool}}
241260
steps:
242261
- uses: actions/checkout@v2
@@ -251,6 +270,7 @@ jobs:
251270
name: failed-tests-${{matrix.vector.jobname}}
252271
path: ${{env.FAILED_TEST_ARTIFACTS}}
253272
dockerized:
273+
name: ${{matrix.vector.jobname}} (${{matrix.vector.image}})
254274
needs: ci-config
255275
if: needs.ci-config.outputs.enabled == 'yes'
256276
strategy:
@@ -259,7 +279,8 @@ jobs:
259279
vector:
260280
- jobname: linux-musl
261281
image: alpine
262-
- jobname: Linux32
282+
- jobname: linux32
283+
os: ubuntu32
263284
image: daald/ubuntu32:xenial
264285
- jobname: pedantic
265286
image: fedora
@@ -311,6 +332,7 @@ jobs:
311332
run: ci/install-dependencies.sh
312333
- run: make sparse
313334
documentation:
335+
name: documentation
314336
needs: ci-config
315337
if: needs.ci-config.outputs.enabled == 'yes'
316338
env:

.travis.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build status](https://github.com/git/git/workflows/CI/PR/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
1+
[![Build status](https://github.com/git/git/workflows/CI/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
22

33
Git - fast, scalable, distributed revision control system
44
=========================================================

ci/install-dependencies.sh

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
1111
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
1212
libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl"
1313

14-
case "$jobname" in
15-
linux-clang|linux-gcc|linux-leaks)
16-
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
14+
case "$runs_on_pool" in
15+
ubuntu-latest)
1716
sudo apt-get -q update
1817
sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \
19-
$UBUNTU_COMMON_PKGS
20-
case "$jobname" in
21-
linux-gcc)
22-
sudo apt-get -q -y install gcc-8
23-
;;
24-
esac
25-
18+
$UBUNTU_COMMON_PKGS $CC_PACKAGE
2619
mkdir --parents "$P4_PATH"
2720
pushd "$P4_PATH"
2821
wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d"
@@ -37,7 +30,7 @@ linux-clang|linux-gcc|linux-leaks)
3730
cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
3831
popd
3932
;;
40-
osx-clang|osx-gcc)
33+
macos-latest)
4134
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
4235
# Uncomment this if you want to run perf tests:
4336
# brew install gnu-time
@@ -51,15 +44,17 @@ osx-clang|osx-gcc)
5144
brew install --cask --no-quarantine perforce
5245
} ||
5346
brew install homebrew/cask/perforce
54-
case "$jobname" in
55-
osx-gcc)
56-
brew install gcc@9
57-
# Just in case the image is updated to contain gcc@9
58-
# pre-installed but not linked.
59-
brew link gcc@9
60-
;;
61-
esac
47+
48+
if test -n "$CC_PACKAGE"
49+
then
50+
BREW_PACKAGE=${CC_PACKAGE/-/@}
51+
brew install "$BREW_PACKAGE"
52+
brew link "$BREW_PACKAGE"
53+
fi
6254
;;
55+
esac
56+
57+
case "$jobname" in
6358
StaticAnalysis)
6459
sudo apt-get -q update
6560
sudo apt-get -q -y install coccinelle libcurl4-openssl-dev libssl-dev \
@@ -77,7 +72,7 @@ Documentation)
7772
test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
7873
sudo gem install --version 1.5.8 asciidoctor
7974
;;
80-
linux-gcc-default|linux-gcc-4.8)
75+
linux-gcc-default)
8176
sudo apt-get -q update
8277
sudo apt-get -q -y install $UBUNTU_COMMON_PKGS
8378
;;

ci/install-docker-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
case "$jobname" in
7-
Linux32)
7+
linux32)
88
linux32 --32bit i386 sh -c '
99
apt update >/dev/null &&
1010
apt install -y build-essential libcurl4-openssl-dev \

ci/lib.sh

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ save_good_tree () {
3434
# successfully before (e.g. because the branch got rebased, changing only
3535
# the commit messages).
3636
skip_good_tree () {
37-
if test "$TRAVIS_DEBUG_MODE" = true || test true = "$GITHUB_ACTIONS"
37+
if test true = "$GITHUB_ACTIONS"
3838
then
3939
return
4040
fi
@@ -60,7 +60,7 @@ skip_good_tree () {
6060
cat <<-EOF
6161
$(tput setaf 2)Skipping build job for commit $CI_COMMIT.$(tput sgr0)
6262
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
6464
To force a re-build delete the branch's cache and then hit 'Restart job'.
6565
EOF
6666
fi
@@ -91,29 +91,7 @@ export MAKEFLAGS=
9191
# and installing dependencies.
9292
set -ex
9393

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"
11795
then
11896
CI_TYPE=azure-pipelines
11997
# We are running in Azure Pipelines
@@ -130,10 +108,6 @@ then
130108
# among *all* phases)
131109
cache_dir="$HOME/test-cache/$SYSTEM_PHASENAME"
132110

133-
url_for_job_id () {
134-
echo "$SYSTEM_TASKDEFINITIONSURI$SYSTEM_TEAMPROJECT/_build/results?buildId=$1"
135-
}
136-
137111
export GIT_PROVE_OPTS="--timer --jobs 10 --state=failed,slow,save"
138112
export GIT_TEST_OPTS="--verbose-log -x --write-junit-xml"
139113
MAKEFLAGS="$MAKEFLAGS --jobs=10"
@@ -182,11 +156,15 @@ export DEFAULT_TEST_TARGET=prove
182156
export GIT_TEST_CLONE_2GB=true
183157
export SKIP_DASHED_BUILT_INS=YesPlease
184158

185-
case "$jobname" in
186-
linux-clang|linux-gcc|linux-leaks)
159+
case "$runs_on_pool" in
160+
ubuntu-latest)
161+
if test "$jobname" = "linux-gcc-default"
162+
then
163+
break
164+
fi
165+
187166
if [ "$jobname" = linux-gcc ]
188167
then
189-
export CC=gcc-8
190168
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3"
191169
else
192170
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python2"
@@ -206,23 +184,18 @@ linux-clang|linux-gcc|linux-leaks)
206184
GIT_LFS_PATH="$HOME/custom/git-lfs"
207185
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
208186
;;
209-
osx-clang|osx-gcc)
187+
macos-latest)
210188
if [ "$jobname" = osx-gcc ]
211189
then
212-
export CC=gcc-9
213190
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
214191
else
215192
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
216193
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"
222-
;;
223-
linux-gcc-default)
224194
;;
225-
Linux32)
195+
esac
196+
197+
case "$jobname" in
198+
linux32)
226199
CC=gcc
227200
MAKEFLAGS="$MAKEFLAGS NO_UNCOMPRESS2=1"
228201
;;
@@ -232,9 +205,6 @@ linux-musl)
232205
MAKEFLAGS="$MAKEFLAGS NO_REGEX=Yes ICONV_OMITS_BOM=Yes"
233206
MAKEFLAGS="$MAKEFLAGS GIT_TEST_UTF8_LOCALE=C.UTF-8"
234207
;;
235-
esac
236-
237-
case "$jobname" in
238208
linux-leaks)
239209
export SANITIZE=leak
240210
export GIT_TEST_PASSING_SANITIZE_LEAK=true

ci/print-test-failures.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ do
3939
test_name="${test_name##*/}"
4040
trash_dir="trash directory.$test_name"
4141
case "$CI_TYPE" in
42-
travis)
43-
;;
4442
azure-pipelines)
4543
mkdir -p failed-test-artifacts
4644
mv "$trash_dir" failed-test-artifacts
@@ -88,11 +86,3 @@ do
8886
fi
8987
fi
9088
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

0 commit comments

Comments
 (0)