Subject: [PATCH v5 00/12] ci: replace our Azure Pipeline by GitHub Actions

From: Đoàn Trần Công Danh <[email-masked]>
Date: Sat, 11 Apr 2020 00:18:02 +0700

Our Azure Pipeline has served us well over the course of the past year or
so, steadily catching issues before the respective patches hit the next
branch.

There is a GitHub-native CI system now, though, called "GitHub Actions"
[https://github.com/features/actions] which is essentially on par with Azure
Pipelines as far as our needs are concerned, and it brings a couple of
advantages:

 * It is substantially easier to set up than Azure Pipelines: all you need
   is to add the YAML-based build definition, push to your fork on GitHub,
   and that's it.
 * The syntax is a bit easier to read than Azure Pipelines'.
 * We get more concurrent jobs (Azure Pipelines is limited to 10 concurrent
   jobs).

With this change, users also no longer need to open a PR at
https://github.com/git/git or at https://github.com/gitgitgadget/git just to
get the benefit of a CI build.

Change in v5 from v4:
- cleanup on dependencies installation.

Change in v4 from v3:
- Use build matrix
- All dependencies are install by scripts
- stop repeating environment variables
- build failure's artifacts will be uploaded

*** BLURB HERE ***

Johannes Schindelin (9):
  ci/lib: if CI type is unknown, show the environment variables
  ci/lib: allow running in GitHub Actions
  ci: fix the `jobname` of the `GETTEXT_POISON` job
  ci: run gem with sudo to install asciidoctor
  README: add a build badge for the GitHub Actions runs
  ci: retire the Azure Pipelines definition
  tests: when run in Bash, annotate test failures with file name/line
    number
  ci: add a problem matcher for GitHub Actions
  ci: let GitHub Actions upload failed tests' directories

Đoàn Trần Công Danh (3):
  ci/lib: set TERM environment variable if not exist
  ci: explicit install all required packages
  ci: configure GitHub Actions for CI/PR

 .github/workflows/main.yml  | 230 +++++++++++++++
 .travis.yml                 |   2 +-
 README.md                   |   2 +-
 azure-pipelines.yml         | 558 ------------------------------------
 ci/git-problem-matcher.json |  16 ++
 ci/install-dependencies.sh  |  16 +-
 ci/lib.sh                   |  31 +-
 ci/print-test-failures.sh   |   7 +
 t/test-lib.sh               |  14 +-
 9 files changed, 309 insertions(+), 567 deletions(-)
 create mode 100644 .github/workflows/main.yml
 delete mode 100644 azure-pipelines.yml
 create mode 100644 ci/git-problem-matcher.json

Range-diff against v4:
 1:  2219bf3db9 =  1:  2219bf3db9 ci/lib: if CI type is unknown, show the environment variables
 2:  2818799a4b =  2:  2818799a4b ci/lib: allow running in GitHub Actions
 3:  b88586c2c5 =  3:  b88586c2c5 ci/lib: set TERM environment variable if not exist
 4:  1df60e677c =  4:  1df60e677c ci: fix the `jobname` of the `GETTEXT_POISON` job
 5:  4f80724641 !  5:  ac7e247bb3 ci: explicit install all required packages
    @@ Commit message
     
         In a later patch, we will support GitHub Action.
     
    -    Explicitly install all of our build dependencies.
    -    Since GitHub Action VM hasn't install our build dependencies, yet.
    +    Explicitly install all of our build dependencies on Linux.
    +    Since GitHub Action's Linux VM hasn't installed our build dependencies.
         And there're no harm to reinstall them (in Travis)
     
         Signed-off-by: Đoàn Trần Công Danh <[email-masked]>
    @@ ci/install-dependencies.sh
      P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
      LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
     +UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
    -+ perl-modules liberror-perl tcl tk gettext zlib1g-dev apache2
    -+ libauthen-sasl-perl libemail-valid-perl libio-socket-ssl-perl
    -+ libnet-smtp-ssl-perl"
    ++ tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
    ++ libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl"
      
      case "$jobname" in
      linux-clang|linux-gcc)
    @@ ci/install-dependencies.sh
      	case "$jobname" in
      	linux-gcc)
      		sudo apt-get -q -y install gcc-8
    -@@ ci/install-dependencies.sh: StaticAnalysis)
    +@@ ci/install-dependencies.sh: osx-clang|osx-gcc)
    + StaticAnalysis)
    + 	sudo apt-get -q update
    + 	sudo apt-get -q -y install coccinelle libcurl4-openssl-dev libssl-dev \
    +-		libexpat-dev gettext
    ++		libexpat-dev gettext make
      	;;
      Documentation)
      	sudo apt-get -q update
     -	sudo apt-get -q -y install asciidoc xmlto docbook-xsl-ns
    -+	sudo apt-get -q -y install asciidoc xmlto docbook-xsl-ns \
    -+		libcurl4-openssl-dev
    ++	sudo apt-get -q -y install asciidoc xmlto docbook-xsl-ns make
      
      	test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
      	gem install --version 1.5.8 asciidoctor
      	;;
    -+GETTEXT_POISON)
    ++linux-gcc-4.8|GETTEXT_POISON)
     +	sudo apt-get -q update
     +	sudo apt-get -q -y install $UBUNTU_COMMON_PKGS
     +	;;
 6:  795ec656c6 <  -:  ---------- ci: run gem with sudo to install asciidoctor
 -:  ---------- >  6:  2fb9f2e2f2 ci: run gem with sudo to install asciidoctor
 7:  ec0aa20119 =  7:  40fe4f7e2c ci: configure GitHub Actions for CI/PR
 8:  46f2b6bce6 =  8:  09735fb1de README: add a build badge for the GitHub Actions runs
 9:  92f2623dc7 =  9:  575b3afd3c ci: retire the Azure Pipelines definition
10:  f688fa50d3 = 10:  ce00385987 tests: when run in Bash, annotate test failures with file name/line number
11:  715d1f732f = 11:  3caeb0b7f4 ci: add a problem matcher for GitHub Actions
12:  0908d5ab9b = 12:  8de46ee1c6 ci: let GitHub Actions upload failed tests' directories
-- 
2.26.0.334.g6536db25bb