@@ -47,86 +47,16 @@ jobs:
47
47
cardano-submit-api
48
48
49
49
steps :
50
- - name : Workaround runner image issue
50
+ - name : Download stylish-haskell
51
51
if : runner.os == 'Linux'
52
- # https://github.com/actions/runner-images/issues/7061
53
- run : sudo chown -R $USER /usr/local/.ghcup
54
-
55
- - name : Install Haskell
56
- uses : input-output-hk/setup-haskell@v1
57
- id : setup-haskell
58
- with :
59
- ghc-version : 9.2.7
60
- cabal-version : 3.8.1.0
61
-
62
- - name : Cabal update
63
- run : cabal update
64
-
65
- - name : Get stylish-haskell
66
- run : cabal get "stylish-haskell-$STYLISH_HASKELL_VERSION"
67
-
68
- - name : Build dry run for stylish-haskell
69
52
run : |
70
- cd "stylish-haskell-$STYLISH_HASKELL_VERSION"
71
- cabal build all --dry-run
72
-
73
- # For users who fork cardano-node and want to define a writable cache, then can set up their own
74
- # S3 bucket then define in their forked repository settings the following secrets:
75
- #
76
- # AWS_ACCESS_KEY_ID
77
- # AWS_SECRET_ACCESS_KEY
78
- # BINARY_CACHE_URI
79
- # BINARY_CACHE_REGION
80
- - name : Cabal cache over S3
81
- uses : action-works/cabal-cache-s3@v1
82
- env :
83
- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
84
- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
85
- with :
86
- region : ${{ secrets.BINARY_CACHE_REGION }}
87
- dist-dir : stylish-haskell-${{ env.STYLISH_HASKELL_VERSION }}/dist-newstyle
88
- store-path : ${{ steps.setup-haskell.outputs.cabal-store }}
89
- threads : 16
90
- archive-uri : ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}
91
- skip : " ${{ secrets.BINARY_CACHE_URI == '' }}"
92
-
93
- # It's important to ensure that people who fork this repository can not only successfully build in
94
- # CI by default, but also have meaning cabal store caching.
95
- #
96
- # Because syncing with S3 requires credentials, we cannot rely on S3 for this. For this reason a
97
- # https fallback is used. The https server mirrors the content of the S3 bucket. The https cabal
98
- # store archive is read-only for security reasons.
99
- #
100
- # Users who fork this repository who want to have a writable cabal store archive are encouraged
101
- # to set up their own S3 bucket.
102
- - name : Cabal cache over HTTPS
103
- uses : action-works/cabal-cache-s3@v1
104
- with :
105
- dist-dir : stylish-haskell-${{ env.STYLISH_HASKELL_VERSION }}/dist-newstyle
106
- store-path : ${{ steps.setup-haskell.outputs.cabal-store }}
107
- threads : 16
108
- archive-uri : https://iohk.cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}
109
- skip : " ${{ secrets.BINARY_CACHE_URI != '' }}"
110
- enable-save : false
111
-
112
- - name : Build stylish-haskell
113
- run : |
114
- cd "stylish-haskell-$STYLISH_HASKELL_VERSION"
115
- cabal build all
116
-
117
- - name : Install stylish-haskell
118
- run : |
119
- cd "stylish-haskell-$STYLISH_HASKELL_VERSION"
120
- cabal install exe:stylish-haskell
121
-
122
- - name : Remove stylish-haskell build directory
123
- run : rm -rf "stylish-haskell-$STYLISH_HASKELL_VERSION"
53
+ version="${{ env.STYLISH_HASKELL_VERSION }}"
124
54
125
- - name : stylish-haskell installation directory
126
- run : find . -name stylish-haskell
55
+ curl -sL \
56
+ "https://github.com/haskell/stylish-haskell/releases/download/v$version/stylish-haskell-v$version-linux-x86_64.tar.gz" \
57
+ | tar -C "/tmp" -xz
127
58
128
- - name : Add installation directory to path
129
- run : echo "PATH=$HOME/.cabal/bin:$PATH" >> $GITHUB_ENV
59
+ echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> $GITHUB_ENV
130
60
131
61
- uses : actions/checkout@v2
132
62
0 commit comments