Re: [PATCH 3/5] ci: configure GitHub Actions for CI/PR
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 4, 2020, 17:59 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2004041952050.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20200403220732.GL2224@szeder.dev>
Hi Gábor,
On Sat, 4 Apr 2020, SZEDER Gábor wrote:
Show 12 quoted lines
> On Tue, Mar 31, 2020 at 12:48:31PM +0000, Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > > > This patch adds CI builds via GitHub Actions. While the underlying > > technology is at least _very_ similar to that of Azure Pipelines, GitHub > > Actions are much easier to set up than Azure Pipelines: no need to > > install a GitHub App, no need to set up an Azure DevOps account, all you > > need to do is push to your fork on GitHub. > > And then receive emails from GitHub if a build fails, even though you > never asked for it? Well, I've always preferred opt-in instead of > opt-out.
This complaint is misdirected.
You can easily disable it if you want to (https://help.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository) and for the vast majority of Git contributors, the default to run this workflow is totally the best idea.
> Btw, does it offer direct shell access for debugging?
There is https://github.com/marketplace/actions/debugging-with-tmate
Show 19 quoted lines
> > Therefore, it makes a lot of sense for us to have a working GitHub > > Actions setup. > > > > While transmogrifying `azure-pipelines.yml` into > > `.github/workflows/main.yml`, we also use the opportunity to accelerate > > the step that sets up a minimal subset of Git for Windows' SDK in the > > Windows-build job: we now download a `.tar.xz` stored in Azure Blobs and > > extract it simultaneously (by calling `curl` and piping the result to > > `tar`, decompressing via `xz`, all three utilities being available by > > grace of using Git for Windows' Bash that is installed on the build > > agents). This accelerates that step from ~1m50s to ~7s. > > > > Also, we do away with the parts that try to mount a file share on which > > `prove` can store data between runs. > > ... and on which we store the list of already successfully tested > trees, so when a branch is rebased changing e.g. only the commit > messages but leaving the code intact, then the CI won't run > unnecessary builds.
In practice, I saw this Pipeline being run time and time again, as the tree _did_ change most of the time.
A pipe dream of mine is to use actual Test Impact Analysis so that we truly can run only the affected tests, but that seems so, so far away.
Show 20 quoted lines
> > It is just too complicated to set > > up, so it's little return on investment there. > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > > --- > > > + linux-clang: > > + runs-on: ubuntu-latest > > + steps: > > + - uses: actions/checkout@v1 > > + - name: install dependencies > > + env: > > + CC: clang > > + run: | > > + sudo apt-get update && > > + sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2-bin && > > Why install all these dependencies here, when the very next command is > 'ci/install-dependencies.sh', whose purpose is to install the > dependencies?
I copy/pasted these from `azure-pipelines.yml`, and agree that they should be handled via `ci/install-dependencies.sh` instead.
Danh (is this the correct way to address you?), if you want to have a look at that, go for it. Otherwise I'll try to find some time to do that myself.
Thanks, Dscho
Show 114 quoted lines
> > + ci/install-dependencies.sh
> > + - name: ci/run-build-and-test.sh
> > + env:
> > + CC: clang
> > + run: |
> > + ci/run-build-and-tests.sh || {
> > + ci/print-test-failures.sh
> > + exit 1
> > + }
> > + linux-gcc:
> > + runs-on: ubuntu-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + run: |
> > + sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
> > + sudo apt-get update &&
> > + sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev apache2 language-pack-is git-svn gcc-8 &&
>
> Likewise, and here you install some additional packages compared to
> the clang job as well.
>
> > + ci/install-dependencies.sh
> > + - name: ci/run-build-and-tests.sh
> > + run: |
> > + ci/run-build-and-tests.sh || {
> > + ci/print-test-failures.sh
> > + exit 1
> > + }
> > + osx-clang:
> > + runs-on: macos-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + env:
> > + CC: clang
> > + run: ci/install-dependencies.sh
> > + - name: ci/run-build-and-tests.sh
> > + env:
> > + CC: clang
> > + run: |
> > + ci/run-build-and-tests.sh || {
> > + ci/print-test-failures.sh
> > + exit 1
> > + }
> > + osx-gcc:
> > + runs-on: macos-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + run: ci/install-dependencies.sh
> > + - name: ci/run-build-and-tests.sh
> > + run: |
> > + ci/run-build-and-tests.sh || {
> > + ci/print-test-failures.sh
> > + exit 1
> > + }
> > + GETTEXT_POISON:
> > + runs-on: ubuntu-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + run: |
> > + sudo apt-get update &&
> > + sudo apt-get -y install git gcc make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext git-email zlib1g-dev
> > + - name: ci/run-build-and-tests.sh
> > + env:
> > + jobname: GETTEXT_POISON
> > + run: |
> > + ci/run-build-and-tests.sh || {
> > + ci/print-test-failures.sh
> > + exit 1
> > + }
> > + linux32:
> > + runs-on: ubuntu-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: ci/run-linux32-docker.sh
> > + run: |
> > + res=0
> > + sudo GITHUB_ACTIONS="$GITHUB_ACTIONS" RUNNER_OS="$RUNNER_OS" GITHUB_REF="$GITHUB_REF" GITHUB_SHA="$GITHUB_SHA" GITHUB_REPOSITORY="$GITHUB_REPOSITORY" GITHUB_RUN_ID="$GITHUB_RUN_ID" CC=$CC MAKEFLAGS="$MAKEFLAGS" bash -lxc ci/run-linux32-docker.sh || res=1
> > + static-analysis:
> > + runs-on: ubuntu-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + run: |
> > + sudo apt-get update &&
> > + sudo apt-get install -y coccinelle libcurl4-openssl-dev libssl-dev libexpat-dev gettext
>
> Likewise, except here you don't even run 'ci/install-dependencies.sh'
> (which would install the same packages, btw.)
>
> > + - name: ci/run-static-analysis.sh
> > + env:
> > + jobname: StaticAnalysis
> > + run: ci/run-static-analysis.sh
> > + documentation:
> > + runs-on: ubuntu-latest
> > + steps:
> > + - uses: actions/checkout@v1
> > + - name: install dependencies
> > + run: |
> > + sudo apt-get update &&
> > + sudo apt-get install -y asciidoc xmlto asciidoctor docbook-xsl-ns
> > + - name: ci/test-documentation.sh
> > + env:
> > + ALREADY_HAVE_ASCIIDOCTOR: yes.
> > + jobname: Documentation
> > + run: ci/test-documentation.sh
> > --
> > gitgitgadget
> >
>