Skip to content

Commit 06ee0ed

Browse files
committed
Update and tidy up documentation about CI
1 parent 3288160 commit 06ee0ed

File tree

2 files changed

+90
-26
lines changed

2 files changed

+90
-26
lines changed

CONTRIBUTING.md

Lines changed: 78 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -304,38 +304,93 @@ Where again, `<PATTERN>` is the name of the folder listed in the
304304
[test/integration/tests/](https://github.com/commercialhaskell/stack/tree/master/test/integration/tests)
305305
folder.
306306

307-
## CI Build rules
307+
## Continuous integration (CI)
308308

309-
We use [Azure](https://dev.azure.com/commercialhaskell/stack/_build)
310-
to do CI builds on Stack. There are two types of build which happens
311-
there:
309+
We use [GitHub Actions](https://docs.github.com/en/actions) to do CI on Stack.
310+
The configuration of the workflows is in the YAML files in `.github/workflows`.
311+
The current active workflows are:
312312

313-
### Test suite build
313+
### Linting - `lint.yml`
314314

315-
This builds the code with `--pedantic`, performs hlint checks and it
316-
runs all test suites on multiple GHC/OS configuration. These are the
317-
rules for triggering it:
315+
This workflow will run if:
316+
* there is a pull request
317+
* commits are pushed to these branches: `master`, `stable` and `rc/**`
318318

319-
* CI will run this if commits are pushed to stable, master branch
320-
* CI will run this for any branches starting with `ci/`
321-
* CI will run this for all new PR's.
319+
The workflow has one job (`style`). It runs on `ubuntu` only and applies
320+
yamllint and Hlint.
322321

323-
### Integration based build
322+
### Test suite - `unit-tests.yml`
324323

325-
This build runs the integration tests in the Stack codebase. This is
326-
scheduled to run daily once for both the stable and master branches.
324+
This workflow will run if:
325+
* there is a pull request
326+
* commits are pushed to these branches: `master`, `stable` and `rc/**`.
327+
* requested
327328

328-
Also, you can manually run this on a specific branch from the Azure UI
329-
if you have the appropriate permissions. If you'd specifically like a
330-
branch or PR to run integration tests, add a comment in the PR and we
331-
can queue one up.
329+
The workflow has two jobs: `pendantic` and `unit-tests`.
332330

333-
### Skipping build
331+
The `pendantic` job runs on `ubuntu` only and builds Stack with the
332+
`--pedantic` flag.
334333

335-
There are times (like a minor type fix) where you don't want the CI to
336-
run. For those cases, you can add `[skip ci]` or `[ci skip]` in your
337-
commit message to skip the builds. For more details,
338-
[refer here](https://github.com/Microsoft/azure-pipelines-agent/issues/858#issuecomment-475768046).
334+
The `unit-tests` job runs on a matrix of operating systems and Stack
335+
project-level YAML configuration files (`stack.yaml`). It builds and tests Stack
336+
with the following flags: `--haddock --no-haddock-deps`.
337+
338+
### Integration-based - `intergration-tests.yml`
339+
340+
This workflow will run if:
341+
* there is a pull request
342+
* commits are pushed to these branches: `master`, `stable` and `rc/**`
343+
* any tag is created
344+
* requested
345+
346+
The workflow has two jobs: `integration-tests` and `github-release`.
347+
348+
The `integration-tests` job runs on a matrix of operating systems (`ubuntu`,
349+
`windows` and `macos`) and makes use of the `release.hs` script at
350+
`etc/scripts`.
351+
352+
Its 'Install deps and run checks' step uses `release.hs check`.
353+
354+
Its 'Build bindist' step uses `release.hs build`.
355+
356+
Its 'Upload bindist' step uploads artifacts using the name of the runner's
357+
operating system (`Linux`, `Windows` or `macOS`) as the name for the artifacts.
358+
359+
The `github-release` job needs `integration-tests` and only takes effect if the
360+
trigger for the workflow was the creation of a tag.
361+
362+
Its steps `Download Linux/Windows/macOS artifact` download the named artifacts
363+
to path `_release`.
364+
365+
Its step 'Hash and sign assets' makes use of a 'secret' environment variable
366+
`RELEASE_SIGNING_KEY` established by the owner of the Stack repository. The
367+
variable contains the private key for the GPG key with ID 0x575159689BEFB442.
368+
That key is imported into GPG and then used by GPG to create a detached signture
369+
for each file.
370+
371+
### ARM64 (AArch64) release - `arm64-release.yml`
372+
373+
This workflow will run if:
374+
* there is a pull request
375+
* commits are pushed to these branches: `master`, `stable` and `rc/**`
376+
* any tag is created
377+
* requested
378+
379+
The workflow has one job (`arm64`). It runs on a self-hosted runner for Linux
380+
and ARM64. It makes use of Docker and a Docker file at
381+
`etc/dockerfiles/arm64.Dockerfile`.
382+
383+
Its 'Build bindist' step makes use of a compiled version of `release.hs` script
384+
at `etc/scripts` to command `release build`.
385+
386+
Its 'Upload bindist' step uploads artifacts using `Linux-ARM64` as the name for
387+
the artifacts.
388+
389+
### Inactive - `stan.yml`
390+
391+
Stan is a Haskell static analysis tool. As of 29 August 2022, it does not
392+
support GHC >= 9.0.1 and Stack is built with GHC >= 9.2.4. Consequently, this
393+
workflow does not run. Its intent is to apply Stan to Stack.
339394

340395
## Slack channel
341396

doc/GUIDE_advanced.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,19 @@ documentation.
364364

365365
## Continuous integration (CI)
366366

367-
### Travis with caching
367+
### GitHub Actions
368368

369-
This content has been moved to a dedicated
370-
[Travis CI document](https://docs.haskellstack.org/en/stable/travis_ci/).
369+
The Stack repository uses GitHub Actions for its own CI. For further
370+
information, see the guide to
371+
[contributing](CONTRIBUTING.md#Continuous-integration-(CI)).
372+
373+
### Azure
374+
375+
For further information, see the [Azure CI](azure_ci.md) documentation.
376+
377+
### Travis
378+
379+
For futher information, see the [Travis CI](travis_ci.md) documentation.
371380

372381
## Editor integration
373382

0 commit comments

Comments
 (0)