File tree Expand file tree Collapse file tree 5 files changed +38
-51
lines changed Expand file tree Collapse file tree 5 files changed +38
-51
lines changed Original file line number Diff line number Diff line change 46
46
strategy :
47
47
fail-fast : false
48
48
matrix :
49
- ghc : ['8.10.7', '9.2.5']
50
- os : [ubuntu-latest]
49
+ ghc :
50
+ - ' 8.10.7'
51
+ - ' 9.2.5'
52
+ os :
53
+ - ubuntu-latest
51
54
52
55
# This code is fitted to the strategy: assumes Linux is used ... etc,
53
56
# change of the strategy may require changing the bootstrapping/run code
Original file line number Diff line number Diff line change 54
54
pre_job :
55
55
runs-on : ubuntu-latest
56
56
outputs :
57
+ ghcs : ${{ steps.ghcs.outputs.ghcs }}
57
58
should_skip : ${{ steps.skip_check.outputs.should_skip }}
58
59
steps :
60
+ # Need the repo checked out in order to read the file
61
+ - uses : actions/checkout@v3
62
+ - id : ghcs
63
+ run : echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
59
64
- id : skip_check
60
65
uses : fkirc/skip-duplicate-actions@v5.3.0
61
66
with :
@@ -80,17 +85,11 @@ jobs:
80
85
strategy :
81
86
fail-fast : false
82
87
matrix :
83
- # This list of GHC (including the "exclude" list) versions must match
84
- # to the list of GHC versions specified in 'test.yml'
85
- ghc : [ "9.4.4"
86
- , "9.2.5"
87
- , "9.0.2"
88
- , "8.10.7"
89
- ]
90
- os : [ "ubuntu-latest"
91
- , "macOS-latest"
92
- , "windows-latest"
93
- ]
88
+ ghc : ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
89
+ os :
90
+ - ubuntu-latest
91
+ - macOS-latest
92
+ - windows-latest
94
93
steps :
95
94
- uses : actions/checkout@v3
96
95
Original file line number Diff line number Diff line change 18
18
pre_job :
19
19
runs-on : ubuntu-latest
20
20
outputs :
21
+ ghcs : ${{ steps.ghcs.outputs.ghcs }}
21
22
should_skip : ${{ steps.skip_check.outputs.should_skip }}
22
23
steps :
24
+ # Need the repo checked out in order to read the file
25
+ - uses : actions/checkout@v3
26
+ - id : ghcs
27
+ run : echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
23
28
- id : skip_check
24
29
uses : fkirc/skip-duplicate-actions@v5.3.0
25
30
with :
44
49
strategy :
45
50
fail-fast : true
46
51
matrix :
47
- ghc : [ "9.2.5"
48
- , "9.0.2"
49
- , "8.10.7"
50
- ]
51
- os : [ "ubuntu-latest"
52
- ]
52
+ ghc : ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
53
+ os :
54
+ - ubuntu-latest
53
55
54
56
steps :
55
57
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change
1
+ [ " 9.4.4" , " 9.2.5" , " 9.0.2" , " 8.10.7" ]
Original file line number Diff line number Diff line change 20
20
outputs :
21
21
should_skip : ${{ steps.skip_check.outputs.should_skip }}
22
22
should_skip_ghcide : ${{ steps.skip_ghcide_check.outputs.should_skip }}
23
+ ghcs : ${{ steps.ghcs.outputs.ghcs }}
23
24
steps :
25
+ # Need the repo checked out in order to read the file
26
+ - uses : actions/checkout@v3
27
+ - id : ghcs
28
+ run : echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
24
29
- id : skip_check
25
30
uses : fkirc/skip-duplicate-actions@v5.3.0
26
31
with :
@@ -52,49 +57,26 @@ jobs:
52
57
53
58
test :
54
59
if : needs.pre_job.outputs.should_skip != 'true'
55
- needs : pre_job
60
+ needs :
61
+ - pre_job
56
62
runs-on : ${{ matrix.os }}
57
63
strategy :
58
64
fail-fast : true
59
65
# when you edit this list of GHC versions,
60
66
# **don't forget**
61
67
# to update the ghc versions in 'caching.yml'.
62
68
matrix :
63
- ghc : [ "9.4.4"
64
- , "9.2.5"
65
- , "9.0.2"
66
- , "8.10.7"
67
- ]
68
- os : [ "ubuntu-latest"
69
- , "macOS-latest"
70
- , "windows-latest"
71
- ]
72
- # Mark which GHC versions on which platform we want to test.
69
+ ghc : ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
70
+ os :
71
+ - ubuntu-latest
72
+ - macOS-latest
73
+ - windows-latest
74
+ # Mark which GHC versions on which platforms we want to test.
73
75
include :
74
- # only test supported ghc major versions
75
- - os : ubuntu-latest
76
- ghc : ' 9.4.4'
77
- test : true
78
- - os : ubuntu-latest
79
- ghc : ' 9.2.5'
80
- test : true
81
- - os : ubuntu-latest
82
- ghc : ' 9.0.2'
83
- test : true
76
+ # Test all supported versions, but only on ubuntu and windows
84
77
- os : ubuntu-latest
85
- ghc : ' 8.10.7'
86
- test : true
87
- - os : windows-latest
88
- ghc : ' 9.4.4'
89
- test : true
90
- - os : windows-latest
91
- ghc : ' 9.2.5'
92
- test : true
93
- - os : windows-latest
94
- ghc : ' 9.0.2'
95
78
test : true
96
79
- os : windows-latest
97
- ghc : ' 8.10.7'
98
80
test : true
99
81
100
82
steps :
You can’t perform that action at this time.
0 commit comments