Skip to content

Commit

Permalink
Avoid templating GitHub Actions workflow (#7952)
Browse files Browse the repository at this point in the history
* Avoid templating GitHub Actions workflow

GitHub Actions workflow have sufficient power to express what we need.
We don't need to maintain and additional templating solution on top.

* Add GHC 9.2, bump bounds, fix syntax

* Switch to official haskell image

* Always run cli tests for ghc 8.2 and above

* Remove step to regenerate GitHub Actions workflows

* Fix missed reference to GHC version

* Fix yaml syntax

* Fix type in the GHC version

* More CI changes

- Run bootstrap.yml on ubuntu-latest
- Use explicit matrix for linux.yml
- Drop containers in favour of haskell setup action
- Drop workaround for ancient git

* Remove unneeded package from CI setup

I belive this is only necessary to run `cabal man` which we do not in
the CI.

* Drop old GHCs from the CI

* Switch macos.yml to haskell/action/setup

Also add the same GHC versions as Linux.

* Simplify CI

- Remove cabal-plan, we actually never call it (I think)
- Remove vendored cabal-doctest
- Remove few stray allow-newer clauses no longer necessary, apparently

Originally done by @gbaz in PR #7907.

* Mark GHC 9.2.1 as experimental

* Remove reference to cabal-plan from validate.sh

* setup-haskell action already runs cabal update

* Add missing build matrix in test-windows-dogfood

* Replace cabal-plan list-bin with cabal list-bin

* Enable caching in the CI

* Fix typo

* Remove continue-on-error until I figure it out

* Keep naming consistent

* Temporarily disable 8.0.2 on macos

* Add missing step id

* Tweaks

Remove workaround for nektos/act, it accidentally sneaked in.

* More tweaks

* Tweaks

* Restore cabal-plan, temporarily mark everything experimental

cabal list-bin doesn't seem to work like cabal-plan does.

* Tweaks

* Ensure cabal-plan executable gets built

* Install automake on MacOS

* Tweaks

* Tweaks

Link experimental flags to relative GitHub issues

* Fix typo
  • Loading branch information
andreabedini authored Feb 19, 2022
1 parent 9a104a9 commit 65318cc
Show file tree
Hide file tree
Showing 28 changed files with 217 additions and 2,310 deletions.
43 changes: 11 additions & 32 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# This file is auto-generated
#
# To regenerate it run
#
# make github-actions
#
name: Bootstrap

on:
push:
branches:
Expand All @@ -15,37 +10,21 @@ on:
- created

jobs:
bootstrap-linux:
name: Bootstrap on Linux
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: bootstrap.py
run: |
ghcup config set cache true
ghcup install ghc 8.10.7
python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc 8.10.7) -d bootstrap/linux-8.10.7.json
- name: Smoke test
run: |
_build/bin/cabal --version
- uses: actions/upload-artifact@v2
with:
name: cabal-linux-bootstrapped
path: _build/artifacts/*

bootstrap-macos:
name: Bootstrap on macOS
runs-on: macos-latest
bootstrap:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
name: Bootstrap ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

# We use linux dependencies
- name: bootstrap.py
run: |
ghcup config set cache true
ghcup install ghc 8.10.7
# We use linux dependencies also on macos
python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc 8.10.7) -d bootstrap/linux-8.10.7.json
- name: Smoke test
Expand All @@ -54,5 +33,5 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: cabal-macos-bootstrapped
name: cabal-${{ matrix.os }}-bootstrapped
path: _build/artifacts/*
Loading

0 comments on commit 65318cc

Please sign in to comment.