Skip to content

Commit 69f4289

Browse files
committed
Fix #6469 Update GitHub workflow actions
Also makes other minor updates to the actions. Also applies HLint 3.8 suggestions to the code.
1 parent 9c5fb9f commit 69f4289

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

.github/workflows/integration-tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
env:
1717
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818

19-
# As of 16 December 2023, ubuntu-latest, windows-latest and macos-latest come
19+
# As of 1 February 2024, ubuntu-latest, windows-latest and macos-latest come
2020
# with Stack 2.13.1 and GHC 9.8.1. windows-latest comes with NSIS 3.08, for
2121
# which the default value of the 'Unicode' installer attribute is 'true'.
2222
# However, that is not the 'large strings' build of NSIS and creates installers
@@ -42,16 +42,16 @@ jobs:
4242
cache-bust: "2024-01-20"
4343
steps:
4444
- name: Clone project
45-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
4646
- name: Cache dependencies on Unix-like OS
4747
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
48-
uses: actions/cache@v3
48+
uses: actions/cache@v4
4949
with:
5050
path: ~/.stack
5151
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.cache-bust }}
5252
- name: Cache dependencies on Windows
5353
if: startsWith(runner.os, 'Windows')
54-
uses: actions/cache@v3
54+
uses: actions/cache@v4
5555
with:
5656
path: |
5757
~\AppData\Roaming\stack
@@ -144,7 +144,7 @@ jobs:
144144
stack etc/scripts/release.hs build ${{ matrix.release-args }}
145145
146146
- name: Upload bindist
147-
uses: actions/upload-artifact@v3
147+
uses: actions/upload-artifact@v4
148148
with:
149149
name: ${{ runner.os }}
150150
path: _release/stack-*
@@ -186,7 +186,7 @@ jobs:
186186
echo '::notice title=ARM64 skipped::To build ARM64, a self-hosted runner needs to be configured and the SELF_HOSTED_RUNNERS secret must contain arm64'
187187
- name: Clone project
188188
if: needs.configuration.outputs.test-arm64 == 'true'
189-
uses: actions/checkout@v3
189+
uses: actions/checkout@v4
190190
- name: Install deps
191191
shell: bash
192192
run: |
@@ -217,7 +217,7 @@ jobs:
217217
218218
- name: Upload bindist
219219
if: needs.configuration.outputs.test-arm64 == 'true'
220-
uses: actions/upload-artifact@v3
220+
uses: actions/upload-artifact@v4
221221
with:
222222
name: Linux-ARM64
223223
path: _release/stack-*
@@ -234,23 +234,23 @@ jobs:
234234
if: startsWith(github.ref, 'refs/tags/')
235235
steps:
236236
- name: Download Linux artifact
237-
uses: actions/download-artifact@v3
237+
uses: actions/download-artifact@v4
238238
with:
239239
name: Linux
240240
path: _release
241241
- name: Download macOS artifact
242-
uses: actions/download-artifact@v3
242+
uses: actions/download-artifact@v4
243243
with:
244244
name: macOS
245245
path: _release
246246
- name: Download Windows artifact
247-
uses: actions/download-artifact@v3
247+
uses: actions/download-artifact@v4
248248
with:
249249
name: Windows
250250
path: _release
251251
- name: Download Linux-ARM64 artifact
252252
if: needs.configuration.outputs.test-arm64 == 'true'
253-
uses: actions/download-artifact@v3
253+
uses: actions/download-artifact@v4
254254
with:
255255
name: Linux-ARM64
256256
path: _release
@@ -270,7 +270,7 @@ jobs:
270270
- name: Create GitHub release (final)
271271
id: github_release_final
272272
if: "!startsWith(github.ref, 'refs/tags/rc/')"
273-
uses: ncipollo/release-action@v1.10.0
273+
uses: ncipollo/release-action@v1.13.0
274274
env:
275275
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
276276
with:
@@ -289,7 +289,7 @@ jobs:
289289
- name: Create GitHub release (release candidate)
290290
id: github_release_rc
291291
if: "startsWith(github.ref, 'refs/tags/rc/')"
292-
uses: ncipollo/release-action@v1.10.0
292+
uses: ncipollo/release-action@v1.13.0
293293
env:
294294
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
295295
with:

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Clone project
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
- name: Apply yamllint
1919
uses: ibiqlik/action-yamllint@v3
2020
with:
2121
format: github
2222
- name: Set up HLint
23-
uses: haskell/actions/hlint-setup@v2
23+
uses: haskell-actions/hlint-setup@v2
2424
with:
25-
version: "3.6.1"
25+
version: "3.8"
2626
- name: Apply HLint
2727
run: |
2828
set -ex

.github/workflows/stan.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- name: Clone project
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Cache dependencies
17-
uses: actions/cache@v3
17+
uses: actions/cache@v4
1818
with:
1919
path: ~/.stack
2020
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
git clone https://github.com/kowainik/stan.git
2525
cd stan
26-
stack --compiler ghc-9.6.4 --local-bin-path ../.bin install
26+
stack --local-bin-path ../.bin install
2727
cd ..
2828
2929
- name: Generate .hie for analysis
@@ -33,7 +33,7 @@ jobs:
3333
run: .bin/stan report --cabal-file-path=stack.cabal
3434

3535
- name: Upload HTML report
36-
uses: actions/upload-artifact@v3
36+
uses: actions/upload-artifact@v4
3737
with:
3838
name: Stan_report
3939
path: stan.html

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- rc/**
1010
workflow_dispatch:
1111

12-
# As of 16 December 2023, ubuntu-latest, windows-latest and macos-latest come
12+
# As of 1 February 2024, ubuntu-latest, windows-latest and macos-latest come
1313
# with Stack 2.13.1 and GHC 9.8.1.
1414

1515
jobs:
@@ -18,9 +18,9 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Clone project
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Cache dependencies
23-
uses: actions/cache@v3
23+
uses: actions/cache@v4
2424
with:
2525
path: ~/.stack
2626
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
@@ -53,16 +53,16 @@ jobs:
5353
stack-args: ""
5454
steps:
5555
- name: Clone project
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5757
- name: Cache dependencies on Unix-like OS
5858
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
59-
uses: actions/cache@v3
59+
uses: actions/cache@v4
6060
with:
6161
path: ~/.stack
6262
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.extra-suffix }}
6363
- name: Cache dependencies on Windows
6464
if: startsWith(runner.os, 'Windows')
65-
uses: actions/cache@v3
65+
uses: actions/cache@v4
6666
with:
6767
path: |
6868
~\AppData\Roaming\stack

.hlint-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- DuplicateRecordFields
1313
- NoFieldSelectors
1414
- OverloadedLists
15-
# Provided from GHC 9.2.1 (base-4.16.0.0):
15+
# Provided from GHC 9.2.1 (base-4.16.0.0):
1616
- OverloadedRecordDot
1717
- OverloadedStrings
1818
- QuasiQuotes

.hlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
- MultiWayIf
7373
- NoFieldSelectors
7474
- OverloadedLists
75-
# Provided from GHC 9.2.1 (base-4.16.0.0):
75+
# Provided from GHC 9.2.1 (base-4.16.0.0):
7676
- OverloadedRecordDot
7777
- OverloadedStrings
7878
- QuasiQuotes

src/Stack/Coverage.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ generateHpcMarkupIndex = do
524524
let outputFile = outputDir </> relFileIndexHtml
525525
ensureDir outputDir
526526
(dirs, _) <- listDir outputDir
527-
rows <- fmap (catMaybes . concat) $ forM dirs $ \dir -> do
527+
rows <- fmap (concatMap catMaybes) $ forM dirs $ \dir -> do
528528
(subdirs, _) <- listDir dir
529529
forM subdirs $ \subdir -> do
530530
let indexPath = subdir </> relFileHpcIndexHtml

src/Stack/Ghci.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ writeMacrosFile ::
621621
-> [GhciPkgInfo]
622622
-> RIO env [String]
623623
writeMacrosFile outputDirectory pkgs = do
624-
fps <- fmap (nubOrd . catMaybes . concat) $
624+
fps <- fmap (nubOrd . concatMap catMaybes) $
625625
forM pkgs $ \pkg -> forM pkg.opts $ \(_, bio) -> do
626626
let cabalMacros = bio.cabalMacros
627627
exists <- liftIO $ doesFileExist cabalMacros

src/Stack/PackageFile.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ resolveGlobFiles ::
8383
-> [String]
8484
-> RIO GetPackageFileContext (Set (Path Abs File))
8585
resolveGlobFiles cabalFileVersion =
86-
fmap (S.fromList . catMaybes . concat) . mapM resolve
86+
fmap (S.fromList . concatMap catMaybes) . mapM resolve
8787
where
8888
resolve name =
8989
if '*' `elem` name

src/Stack/Runners.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ shouldUpgradeCheck = do
255255
config <- ask
256256
when config.recommendUpgrade $ do
257257
now <- getCurrentTime
258-
let yesterday = addUTCTime (-24 * 60 * 60) now
258+
let yesterday = addUTCTime (-(24 * 60 * 60)) now
259259
checks <- upgradeChecksSince yesterday
260260
when (checks == 0) $ do
261261
mversion <- getLatestHackageVersion NoRequireHackageIndex "stack" UsePreferredVersions

0 commit comments

Comments
 (0)