1- # packcheck-0.6 .0
1+ # packcheck-0.7 .0
22# You can use any of the options supported by packcheck as environment
33# variables here. See https://github.com/composewell/packcheck for all
44# options and their explanation.
@@ -22,155 +22,146 @@ on:
2222
2323jobs :
2424 build :
25- name : >-
26- ${{ matrix.name }}
27- ${{ matrix.command }}
28- ${{ matrix.runner }}
29- ${{ matrix.ghc_version }}
25+ name : ${{ matrix.name }}
3026 env :
3127 # ------------------------------------------------------------------------
3228 # Common options
3329 # ------------------------------------------------------------------------
3430 # GHC_OPTIONS: "-Werror"
31+ GHCUP_VERSION : 0.1.20.0
32+ DOCSPEC_URL : https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz
33+ DOCSPEC_OPTIONS : " --timeout 60"
3534 CABAL_REINIT_CONFIG : y
3635 LC_ALL : C.UTF-8
3736
38- # ------------------------------------------------------------------------
39- # What to build
40- # ------------------------------------------------------------------------
41- # DISABLE_TEST: "y"
42- # DISABLE_BENCH: "y"
43- # DISABLE_DOCS: "y"
44- # DISABLE_SDIST_BUILD: "y"
45- # DISABLE_SDIST_GIT_CHECK: "y"
46- # DISABLE_DIST_CHECKS: "y"
47-
48- # ------------------------------------------------------------------------
49- # Selecting tool versions
50- # ------------------------------------------------------------------------
51- GHCVER : ${{ matrix.ghc_version }}
52- # RESOLVER: ${{ matrix.stack_resolver }}
37+ STACK_UPGRADE : " y"
5338
54- # ------------------------------------------------------------------------
55- # stack options
56- # ------------------------------------------------------------------------
57- # Note requiring a specific version of stack using STACKVER may fail due to
58- # github API limit while checking and upgrading/downgrading to the specific
59- # version.
60- # STACKVER: "1.6.5"
61- # STACK_UPGRADE: "y"
62- STACK_YAML : " stack.yaml"
63-
64- # ------------------------------------------------------------------------
65- # cabal options
66- # ------------------------------------------------------------------------
6739 CABAL_CHECK_RELAX : y
68- CABAL_HACKAGE_MIRROR : " hackage.haskell.org:http://hackage.fpcomplete.com"
69- CABAL_PROJECT : ${{ matrix.cabal_project }}
70- CABAL_BUILD_OPTIONS : ${{ matrix.cabal_build_options }}
71- DISABLE_SDIST_PROJECT_CHECK : y
72-
73- # ------------------------------------------------------------------------
74- # Where to find the required tools
75- # ------------------------------------------------------------------------
76- PATH : /opt/ghc/bin:/sbin:/usr/sbin:/bin:/usr/bin
77- # TOOLS_DIR: /opt
40+ CABAL_HACKAGE_MIRROR : hackage.haskell.org:http://hackage.fpcomplete.com
7841
79- # ------------------------------------------------------------------------
80- # Location of packcheck.sh (the shell script invoked to perform CI tests ).
81- # ------------------------------------------------------------------------
82- # You can either commit the packcheck.sh script at this path in your repo or
83- # you can use it by specifying the PACKCHECK_REPO_URL option below in which
84- # case it will be automatically copied from the packcheck repo to this path
85- # during CI tests. In any case it is finally invoked from this path.
8642 PACKCHECK : " ./packcheck.sh"
87- # If you have not committed packcheck.sh in your repo at PACKCHECK
88- # then it is automatically pulled from this URL.
8943 PACKCHECK_GITHUB_URL : " https://raw.githubusercontent.com/composewell/packcheck"
90- PACKCHECK_GITHUB_COMMIT : " v0.6.0 "
44+ PACKCHECK_GITHUB_COMMIT : " 7c4e1ab7a59b5ed6e92cfd0da67460a6116be4ac "
9145
92- # ------------------------------------------------------------------------
93- # Final build variables
94- # ------------------------------------------------------------------------
95- PACKCHECK_COMMAND : ${{ matrix.command }} ${{ matrix.pack_options }}
46+ BUILD : ${{ matrix.build }}
47+ GHCVER : ${{ matrix.ghc_version }}
48+ # RESOLVER: ${{ matrix.resolver }}
49+ CABAL_BUILD_OPTIONS : ${{ matrix.cabal_build_options }}
50+ CABAL_PROJECT : ${{ matrix.cabal_project }}
51+ DISABLE_DOCS : ${{ matrix.disable_docs }}
52+ # DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
53+ # DISABLE_SDIST_BUILD: "y"
54+ HLINT_VERSION : 3.6.1
55+ HLINT_OPTIONS : ${{ matrix.hlint_options }}
56+ HLINT_TARGETS : ${{ matrix.hlint_targets }}
9657
9758 runs-on : ${{ matrix.runner }}
9859 strategy :
9960 fail-fast : false
10061 matrix :
10162 include :
102- - name : 9.4.4-linux
103- command : cabal-v2
63+ - name : 9.10.1-Werror
64+ ghc_version : 9.10.1
65+ build : cabal
66+ runner : ubuntu-latest
67+ cabal-version : 3.10.2.0
68+ cabal_project : cabal.project.Werror
69+
70+ - name : 9.8.1-Werror
71+ ghc_version : 9.8.1
72+ build : cabal
73+ runner : ubuntu-latest
74+ cabal-version : 3.10.2.0
75+ cabal_project : cabal.project.Werror
76+
77+ - name : hlint
78+ build : hlint
79+ hlint_options : " lint"
80+ hlint_targets : " src"
81+ runner : ubuntu-latest
82+ cabal-version : 3.2
83+ cabal_project : cabal.project.Werror
84+
85+ - name : 9.6.3-macos
86+ runner : macos-latest
87+ ghc_version : 9.6.3
88+ build : cabal
89+ cabal-version : 3.10.1.0
90+ cabal_project : cabal.project.Werror
91+
92+ - name : 9.4.4
10493 runner : ubuntu-latest
10594 ghc_version : 9.4.4
95+ build : cabal
96+ cabal-version : 3.8.1.0
10697 cabal_project : cabal.project.Werror
10798
108- - name : 9.2.2-linux
109- command : cabal-v2
99+ - name : 9.4.4
110100 runner : ubuntu-latest
111- ghc_version : 9.2.2
101+ ghc_version : 9.4.4
102+ build : cabal
103+ cabal-version : 3.8.1.0
112104 cabal_project : cabal.project.Werror
113105
114- - name : 9.0.2-linux
115- command : cabal-v2
106+ - name : 9.2.7
116107 runner : ubuntu-latest
117- ghc_version : 9.0.2
118- cabal_project : cabal.project.user
108+ ghc_version : 9.2.7
109+ build : cabal
110+ cabal-version : 3.6
111+ cabal_project : cabal.project.Werror
119112
120- - name : 8.10.7-linux
121- command : cabal-v2
113+ - name : 8.10.7
122114 runner : ubuntu-latest
123115 ghc_version : 8.10.7
124- cabal_project : cabal.project.user
116+ build : cabal
117+ cabal-version : 3.2
118+ cabal_project : cabal.project.Werror
125119
126- - name : 8.10.7-linux-fusion-plugin
127- command : cabal-v2
120+ - name : 8.8.4
128121 runner : ubuntu-latest
129- ghc_version : 8.10.7
130- cabal_project : cabal.project.user
131- cabal_build_options : " --flag fusion-plugin "
122+ ghc_version : 8.8.4
123+ build : cabal
124+ cabal-version : 3.2
132125
133- - name : 9.2.2-macos
134- ghc_version : 9.2.2
135- command : cabal-v2
136- runner : macos-latest
137- cabal_project : cabal.project.user
126+ - name : 8.6.5
127+ runner : ubuntu-latest
128+ ghc_version : 8.6.5
129+ build : cabal
130+ cabal-version : 3.2
138131
139132 steps :
140133 - uses : actions/checkout@v2
141134
142- - uses : haskell/actions/setup@v1
143- if : ${{ matrix.name != 'hlint' }}
144- with :
145- ghc-version : ${{ matrix.ghc_version }}
146- enable-stack : true
147- stack-version : ' latest'
148- cabal-version : ' latest'
149-
150- - uses : actions/cache@v2
151- name : Cache common directories
135+ - uses : actions/cache@v4
136+ name : Restore cache
152137 with :
153138 path : |
154- ~/.cabal
155- ~/.ghc
156139 ~/.local
140+ ~/.cabal
157141 ~/.stack
158- key : ${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.runner }}
142+ .stack-work
143+ key : ${{ runner.os }}-${{ matrix.name }}
159144
160145 - name : Download packcheck
161146 run : |
162- # Check for PACKCHECK_GITHUB_COMMIT
163- if test -z "$PACKCHECK_GITHUB_COMMIT"
147+ # If a custom stack-yaml is specified, replace the default with that
148+ #if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
149+ #unset STACK_YAML
150+
151+ if test ! -e "$PACKCHECK"
152+ then
153+ if test -z "$PACKCHECK_GITHUB_COMMIT"
154+ then
155+ die "PACKCHECK_GITHUB_COMMIT is not specified."
156+ fi
157+ PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
158+ curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
159+ chmod +x $PACKCHECK
160+ elif test ! -x "$PACKCHECK"
164161 then
165- die "PACKCHECK_GITHUB_COMMIT is not specified."
162+ chmod +x $PACKCHECK
166163 fi
167164
168- # Get packcheck if needed
169- CURL=$(which curl)
170- PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
171- if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
172- chmod +x $PACKCHECK
173-
174165 - name : Run packcheck
175166 run : |
176- bash -c "$PACKCHECK $PACKCHECK_COMMAND "
167+ bash -c "$PACKCHECK $BUILD "
0 commit comments