diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 62afaba3d5feca30d510508b46eaa4428cfb5679..bcec1642505a4cbd0df1b24052a15d807a743bfb 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -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: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7093957d50d163947a8d4751de81d0b630259676..615f02e43f1aa7d74b5df95da6d039ef8d934c31 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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: @@ -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 }} @@ -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 }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9d15be7fe0b4e3b540f5ecb42f6a8b9ed577f2bc..317ccb0fa675d87326205002b460570dccd4fdf6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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: @@ -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 }} @@ -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 - diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml index a34d4f013864d93fa7b32957b52eaec5a9adf9fa..09decc369a7d16d2328e7bf130e006d317ad81ad 100644 --- a/.github/workflows/quick-jobs.yml +++ b/.github/workflows/quick-jobs.yml @@ -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: diff --git a/.github/workflows/users-guide.yml b/.github/workflows/users-guide.yml index fe960f1b6ca38b8d45ac13a35ce60b2280920d90..b5aac8796f54d25b33b65ebf1d8df2c4a0ebf681 100644 --- a/.github/workflows/users-guide.yml +++ b/.github/workflows/users-guide.yml @@ -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: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ad208042ab8fd35d691b5c7390362b77f4a2cc9b..0314ed107b6aac7fbf6909f00c7efe63e452d0b5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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: