1 # This file is auto-generated
19 validate-{{ mangleVersion job.version }}{% if job.old %}-old{% endif %}:
20 name: validate.sh {%if job.old %}old GHCs{% else %}ghc-{{job.version}}{% endif %}
22 {% for needs in job.needs %}
23 needs: validate-{{ mangleVersion needs }}
26 image: phadej/ghc:{{job.version}}-{% if job.xenial %}xenial{% else %}bionic{% endif %}
32 # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
34 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
35 - name: Install cabal-plan
37 mkdir -p $HOME/.cabal/bin
38 curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
39 echo "de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz" | sha256sum -c -
40 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
42 chmod a+x $HOME/.cabal/bin/cabal-plan
43 {% if or job.xenial job.old %}
44 - name: apt-get update
48 - name: Install dynamic libraries
49 run: apt-get install -y ghc-{{job.version}}-dyn
52 - name: Install extra compilers
53 run: apt-get install -y ghc-7.0.4-dyn ghc-7.2.2-dyn ghc-7.4.2-dyn
55 - name: Update Hackage index
57 # https://github.com/actions/checkout/issues/170
58 # - uses: actions/checkout@v2
61 echo $GITHUB_REF $GITHUB_SHA
62 git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
63 git fetch origin $GITHUB_SHA:temporary-ci-branch
64 git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
65 {% for step in job.steps %}
66 - name: Validate {{step}}
67 run: sh validate.sh -j 2 -w ghc-{{job.version}} -v {{job.flags}} -s {{step}}