Skip to content

Commit

Permalink
Merge pull request #8000 from jneira/post-remove-ci-templates
Browse files Browse the repository at this point in the history
Post remove ci templates
  • Loading branch information
Mikolaj authored Feb 24, 2022
2 parents 8667432 + d7b25a2 commit b8a272a
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Bootstrap

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand Down
72 changes: 71 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Linux

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -11,7 +16,7 @@ on:

jobs:
validate:
name: Validate ghc-${{ matrix.ghc }}
name: Validate ubuntu-latest ghc-${{ matrix.ghc }}

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -108,3 +113,68 @@ jobs:
if: matrix.cli == true
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s cli-suite

validate-old-ghcs:
name: Validate old ghcs ${{ matrix.extra-ghc }}
runs-on: ubuntu-18.04
needs: validate
# This job needs an older ubuntu (16.04) cause the needed
# old ghcs using the `-dyn` flavour are not installable
# from ppa/hvr in newer ones
# see https://github.com/haskell/cabal/issues/8011
container:
image: phadej/ghc:8.8.4-xenial

strategy:
matrix:
# Newer ghc versions than 8.8.4 has to be installed with ghcup cause
# they are not available in ppa/hvr. The ghcup installation
# needs `sudo` which is not available in the xenial container
ghc: ["8.8.4"]
extra-ghc: ["7.10.3", "7.8.4", "7.6.3", "7.4.2", "7.2.2", "7.0.4"]

steps:

# We can't use actions/checkout with the xenial docker container
# cause it does not work with the git version included in it, see:
# https://github.com/actions/checkout/issues/170
# https://github.com/actions/checkout/issues/295
# - uses: actions/checkout@v2
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Install extra compiler
run: |
apt-get update
apt-get install -y ghc-${{ matrix.extra-ghc }}-dyn
- uses: haskell/actions/setup@v1
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}

# TODO: ideally those jobs should reuse the cabal artifact generated in the
# previous step. Until that we use the cache generated in the previous step
# to make the build faster. This job only needs it in read mode.
- uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-

- name: Install cabal-plan
run: |
cd $(mktemp -d)
cabal install cabal-plan --constraint='cabal-plan +exe'
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
- name: Validate build
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s build

- name: "Validate lib-suite-extras --extra-hc ghc-${{ matrix.extra-ghc }}"
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v --lib-only -s lib-suite-extras --extra-hc /opt/ghc/${{ matrix.extra-ghc }}/bin/ghc-${{ matrix.extra-ghc }}
8 changes: 6 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: MacOS

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -11,7 +16,7 @@ on:

jobs:
validate:
name: Validate ghc-${{ matrix.ghc }}
name: Validate macos-latest ghc-${{ matrix.ghc }}

runs-on: macos-latest
continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -111,4 +116,3 @@ jobs:
- name: Validate cli-suite
if: matrix.cli == true
run: sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v ${{ matrix.flags }} -s cli-suite

5 changes: 5 additions & 0 deletions .github/workflows/quick-jobs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Quick jobs

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/users-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

name: Users guide

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Windows

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
push:
branches:
Expand Down

0 comments on commit b8a272a

Please sign in to comment.