@@ -16,15 +16,13 @@ jobs:
1616 should_skip : ${{ steps.skip_check.outputs.should_skip }}
1717 steps :
1818 - id : skip_check
19- uses : fkirc/skip-duplicate-actions@master
19+ uses : fkirc/skip-duplicate-actions@v3.4.0
2020 with :
2121 cancel_others : true
2222 paths_ignore : ' ["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**"]'
2323
24-
2524 test :
2625 needs : pre_job
27- if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
2826 runs-on : ${{ matrix.os }}
2927 strategy :
3028 fail-fast : true
@@ -58,33 +56,34 @@ jobs:
5856 # ghc: '8.6.4'
5957
6058 steps :
61- # Cancel queued workflows from earlier commits in this branch
62- - uses : fkirc/skip-duplicate-actions@master
63-
64- - uses : actions/checkout@v2
59+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
60+ uses : actions/checkout@v2
6561 with :
6662 submodules : true
67- - uses : haskell/actions/setup@v1
63+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
64+ uses : haskell/actions/setup@v1
6865 with :
6966 ghc-version : ${{ matrix.ghc }}
7067 cabal-version : " 3.2"
7168
72- - run : ./fmt.sh
69+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
70+ run : ./fmt.sh
7371 name : " HLint via ./fmt.sh"
7472
75- - name : Set some window specific things
76- if : matrix.os == 'windows-latest'
73+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os == 'windows-latest'}}
74+ name : Set some window specific things
7775 run : |
7876 echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
7977 echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
8078
81- - name : Set some linux/macOS specific things
82- if : matrix.os != 'windows-latest'
79+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os != 'windows-latest'}}
80+ name : Set some linux/macOS specific things
8381 run : |
8482 echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
8583 echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
8684
87- - name : Cache Cabal
85+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
86+ name : Cache Cabal
8887 uses : actions/cache@v2
8988 env :
9089 cache-name : cache-cabal
@@ -98,28 +97,31 @@ jobs:
9897 v2-${{ runner.os }}-${{ matrix.ghc }}-build-
9998 v2-${{ runner.os }}-${{ matrix.ghc }}
10099
101- - run : cabal update
100+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
101+ run : cabal update
102102
103103 # Need this to work around filepath length limits in Windows
104- - name : Shorten binary names
104+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
105+ name : Shorten binary names
105106 run : |
106107 sed -i.bak -e 's/haskell-language-server/hls/g' \
107108 -e 's/haskell_language_server/hls/g' \
108109 haskell-language-server.cabal
109110 sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
110111 src/**/*.hs exe/*.hs
111112
112- - name : Build
113+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' }}
114+ name : Build
113115 # Retry it three times to workaround compiler segfaults in windows
114116 run : cabal build || cabal build || cabal build
115117
116- - name : Test ghcide
117- if : ${{ matrix.test }}
118+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
119+ name : Test ghcide
118120 # run the tests without parallelism to avoid running out of memory
119121 run : cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun"
120122
121- - name : Test func- test suite
122- if : ${{ matrix. test }}
123+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
124+ name : Test func- test suite
123125 env :
124126 HLS_TEST_EXE : hls
125127 HLS_WRAPPER_TEST_EXE : hls-wrapper
@@ -128,8 +130,8 @@ jobs:
128130 # instances to be spun up for the poor github actions runner to handle
129131 run : cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
130132
131- - name : Test wrapper- test suite
132- if : ${{ matrix. test }}
133+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
134+ name : Test wrapper- test suite
133135 env :
134136 HLS_TEST_EXE : hls
135137 HLS_WRAPPER_TEST_EXE : hls-wrapper
@@ -138,30 +140,30 @@ jobs:
138140 # instances to be spun up for the poor github actions runner to handle
139141 run : cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"
140142
141- - name : Test hls-brittany-plugin
142- if : ${{ matrix.test }}
143+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
144+ name : Test hls-brittany-plugin
143145 run : cabal test hls-brittany-plugin || cabal test hls-brittany-plugin --test-options="-j1"
144146
145- - name : Test hls-class-plugin
146- if : ${{ matrix.test }}
147+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
148+ name : Test hls-class-plugin
147149 run : cabal test hls-class-plugin || cabal test hls-class-plugin --test-options="-j1"
148150
149- - name : Test hls-eval-plugin
150- if : ${{ matrix.test }}
151+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
152+ name : Test hls-eval-plugin
151153 run : cabal test hls-eval-plugin --test-options="-j1 --rerun" || cabal test hls-eval-plugin --test-options="-j1 --rerun"
152154
153- - name : Test hls-haddock-comments-plugin
154- if : ${{ matrix.test }}
155+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
156+ name : Test hls-haddock-comments-plugin
155157 run : cabal test hls-haddock-comments-plugin || cabal test hls-haddock-comments-plugin --test-options="-j1"
156158
157- - name : Test hls-splice-plugin
158- if : ${{ matrix.test }}
159+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
160+ name : Test hls-splice-plugin
159161 run : cabal test hls-splice-plugin || cabal test hls-splice-plugin --test-options="-j1"
160162
161- - name : Test hls-stylish-haskell-plugin
162- if : ${{ matrix.test }}
163+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
164+ name : Test hls-stylish-haskell-plugin
163165 run : cabal test hls-stylish-haskell-plugin || cabal test hls-stylish-haskell-plugin --test-options="-j1"
164166
165- - name : Test hls-tactics-plugin test suite
166- if : ${{ matrix. test }}
167+ - if : ${{ needs.pre_job.outputs.should_skip != 'true' && matrix. test }}
168+ name : Test hls-tactics-plugin test suite
167169 run : LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1"
0 commit comments