Skip to content

Post remove ci templates #8000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why head_ref and not ref?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point head_ref is only defined for pull requests and workflows are triggered for direct commits too.
The consequence is that, for consecutive direct and merge commits in master (and 3.6, 3.4 etc), they will be cancelled but the last one.
So we will lose the status of those intermmediate commits.
There is a small probability of a green pr breaking master cause we are not enforcing the pr is up to date with master before merging it. Also there is a even small probability of merge another pr just after the offending one and we will not know the real cause is the intemmediate and no the final one.
Will change asap

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