@@ -6,11 +6,6 @@ defaults:
66 run :
77 shell : bash
88
9- # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
10- concurrency :
11- group : ${{ github.ref }}-${{ github.workflow }}
12- cancel-in-progress : true
13-
149on :
1510 push :
1611 branches :
1914 release :
2015 types :
2116 - created
17+ workflow_dispatch :
2218
2319env :
2420 # We choose a stable ghc version across all os's
3834 strategy :
3935 matrix :
4036 os : ["ubuntu-20.04", "macos-latest", "windows-latest"]
41- ghc : ["9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
42- exclude :
43- # Run takes 4+ hours
44- - os : " windows-latest"
45- ghc : " 9.0.2"
46- # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
47- - os : " windows-latest"
48- ghc : " 8.10.7"
49- # lot of segfaults caused by ghc bugs
50- - os : " windows-latest"
51- ghc : " 8.8.4"
52- # it also throws segfaults randomly
53- - os : " windows-latest"
54- ghc : " 8.4.4"
55- # it often randomly does "C:\Users\RUNNER~1\AppData\Local\Temp\ghcFEDE.c: DeleteFile "\\\\?\\C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\ghcFEDE.c": permission denied (Access is denied.)"
56- - os : " windows-latest"
57- ghc : " 8.6.5"
37+ ghc : ["9.2.8"]
5838
5939 steps :
6040
@@ -321,76 +301,6 @@ jobs:
321301 if : ( runner.os != 'Windows' ) && ( matrix.cli != 'false' )
322302 run : sh validate.sh $FLAGS -s cli-suite
323303
324- validate-old-ghcs :
325- name : Validate old ghcs ${{ matrix.extra-ghc }}
326- runs-on : ubuntu-20.04
327- needs : validate
328- # This job needs an older ubuntu (16.04) cause
329- # the required old ghcs using the `-dyn` flavour
330- # are not installable from ppa/hvr in newer ones
331- # see https://github.com/haskell/cabal/issues/8011
332- container :
333- image : phadej/ghc:8.8.4-xenial
334-
335- strategy :
336- matrix :
337- # Newer ghc versions than 8.8.4 have to be installed with ghcup cause
338- # they are not available in ppa/hvr. The ghcup installation
339- # needs `sudo` which is not available in the xenial container
340- ghc : ["8.8.4"]
341- extra-ghc : ["7.10.3", "7.8.4", "7.6.3", "7.4.2", "7.2.2", "7.0.4"]
342-
343- steps :
344-
345- # We can't use actions/checkout with the xenial docker container
346- # cause it does not work with the git version included in it, see:
347- # https://github.com/actions/checkout/issues/170
348- # https://github.com/actions/checkout/issues/295
349- # - uses: actions/checkout@v3
350- - name : Checkout
351- run : |
352- echo $GITHUB_REF $GITHUB_SHA
353- git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
354- git fetch origin $GITHUB_SHA:temporary-ci-branch
355- git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
356-
357- - name : Install extra compiler
358- run : |
359- apt-get update
360- apt-get install -y ghc-${{ matrix.extra-ghc }}-dyn
361-
362- - uses : haskell-actions/setup@v2
363- id : setup-haskell
364- with :
365- ghc-version : ${{ matrix.ghc }}
366- # Make sure this bindist works in this old environment
367- cabal-version : 3.10.1.0
368-
369- # As we are reusing the cached build dir from the previous step
370- # the generated artifacts are available here,
371- # including the cabal executable and the test suite
372- - uses : actions/cache@v3
373- with :
374- path : |
375- ${{ steps.setup-haskell.outputs.cabal-store }}
376- dist-*
377- key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
378- restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
379-
380- - name : Install cabal-plan
381- run : |
382- cd $(mktemp -d)
383- cabal install cabal-plan --constraint='cabal-plan +exe'
384- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
385-
386- - name : Validate build
387- run : sh validate.sh ${{ env.COMMON_FLAGS }} -s build
388-
389- - name : " Validate lib-suite-extras --extra-hc ghc-${{ matrix.extra-ghc }}"
390- env :
391- EXTRA_GHC : " /opt/ghc/${{ matrix.extra-ghc }}/bin/ghc-${{ matrix.extra-ghc }}"
392- run : sh validate.sh ${{ env.COMMON_FLAGS }} --lib-only -s lib-suite-extras --extra-hc ${{ env.EXTRA_GHC }}
393-
394304 # The previous jobs use a released version of cabal to build cabal HEAD itself
395305 # This one uses the cabal HEAD generated executable in the previous step
396306 # to build itself again, as sanity check
@@ -448,19 +358,3 @@ jobs:
448358 - name : Build using cabal HEAD
449359 run : sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s build
450360
451- # We use this job as a summary of the workflow
452- # It will fail if any of the previous jobs does it
453- # This way we can use it exclusively in branch protection rules
454- # and abstract away the concrete jobs of the workflow, including their names
455- validate-post-job :
456- if : always()
457- name : Validate post job
458- runs-on : ubuntu-20.04
459- # IMPORTANT! Any job added to the workflow should be added here too
460- needs : [validate, validate-old-ghcs, dogfooding]
461-
462- steps :
463- - run : |
464- echo "jobs info: ${{ toJSON(needs) }}"
465- - if : contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
466- run : exit 1
0 commit comments