File tree 1 file changed +7
-3
lines changed
.github/actions/setup-build
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,21 @@ runs:
32
32
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
33
33
shell : bash
34
34
35
+ # This copy an alternative cabal-ghc${GHCVER}.project (for example cabal-ghc921.project)
36
+ # as main cabal-project, for not fully supported ghc versions
35
37
# Needs to be before the caching step so that the cache can detect changes to the modified cabal.project file
36
- - if : inputs.ghc == '9.0.1' || inputs.ghc == '9.2.1'
37
- name : (GHC 9.0/9.2) Use modified `cabal.project`
38
+ - name : Use possible modified `cabal.project`
38
39
env :
39
40
GHCVER : ${{ inputs.ghc }}
40
41
run : |
41
42
# File has some protections preventing regular `rm`.
42
43
# (most probably sticky bit is set on $HOME)
43
44
# `&&` insures `rm -f` return is positive.
44
45
# Many platforms aslo have `alias cp='cp -i'`.
45
- rm -f -v cabal.project && cp -v cabal-ghc${GHCVER//./}.project cabal.project
46
+ ALT_PROJECT_FILE=cabal-ghc${GHCVER//./}.project
47
+ if [[ -f "$ALT_PROJECT_FILE" ]]; then
48
+ rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE" cabal.project
49
+ fi
46
50
shell : bash
47
51
48
52
- if : inputs.os == 'Windows' && inputs.ghc == '8.8.4'
You can’t perform that action at this time.
0 commit comments