Skip to content

Commit 771fda2

Browse files
committed
CI: bench: fitting the workflow to strategy chosen
Still kept the 9.0.1 bootstrap, because the very next workflow standard GHC update would hit the need of that code.
1 parent abcae20 commit 771fda2

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

.github/workflows/bench.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
os: [ubuntu-latest]
3535
cabal: ['3.6']
3636

37+
# This code is fitted to the strategy: assumes Linux is used ... etc,
38+
# change of the strategy may require changing the bootstrapping/run code
39+
3740
steps:
3841
- uses: actions/checkout@v2
3942

@@ -45,39 +48,11 @@ jobs:
4548
cabal-version: ${{ matrix.cabal }}
4649
enable-stack: false
4750

48-
- if: runner.os == 'Windows'
49-
name: (Windows) Platform config
50-
run: |
51-
echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
52-
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
53-
- if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
54-
name: (Linux,macOS) Platform config
51+
- name: Platform config
5552
run: |
5653
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
5754
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
5855
59-
# Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
60-
- if: matrix.ghc == '9.0.1'
61-
name: (GHC 9.0.1) Use modified `cabal.project`
62-
run: |
63-
cp cabal-ghc901.project cabal.project
64-
- if: runner.os == 'Windows' && matrix.ghc == '8.8.4'
65-
name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
66-
run: |
67-
echo "package floskell" >> cabal.project
68-
echo " ghc-options: -O0" >> cabal.project
69-
70-
# Shorten binary names as a workaround for filepath length limits in Windows,
71-
# but since tests are hardcoded on this workaround -
72-
# all platforms (in 2021-12-07) need it.
73-
- name: Workaround shorten binary names
74-
run: |
75-
sed -i.bak -e 's/haskell-language-server/hls/g' \
76-
-e 's/haskell_language_server/hls/g' \
77-
haskell-language-server.cabal cabal.project
78-
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
79-
src/**/*.hs exe/*.hs
80-
8156
- name: Cache Cabal
8257
uses: actions/cache@v2
8358
with:

0 commit comments

Comments
 (0)