Skip to content

Commit 131866e

Browse files
committed
CI: {caching,bench}: add executable patching for cache
1 parent 7908dcd commit 131866e

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/bench.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ jobs:
5757
run: |
5858
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
5959
60+
# All workflows which distinquishes cache on `cabal.project` needs this.
61+
- name: Workaround shorten binary names
62+
run: |
63+
sed -i.bak -e 's/haskell-language-server/hls/g' \
64+
-e 's/haskell_language_server/hls/g' \
65+
haskell-language-server.cabal cabal.project
66+
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
67+
src/**/*.hs exe/*.hs
68+
6069
- name: Retrieving `cabal.project` Hackage timestamp
6170
run: |
6271
# Form: index-state: 2021-11-29T08:11:08Z

.github/workflows/caching.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ jobs:
9898
echo "package floskell" >> cabal.project
9999
echo " ghc-options: -O0" >> cabal.project
100100
101+
# Shorten binary names as a workaround for filepath length limits in Windows,
102+
# but since tests are hardcoded on this workaround -
103+
# all platforms (in 2021-12-07) need it.
104+
# All workflows which distinquishes cache on `cabal.project` needs this.
105+
- name: Workaround shorten binary names
106+
run: |
107+
sed -i.bak -e 's/haskell-language-server/hls/g' \
108+
-e 's/haskell_language_server/hls/g' \
109+
haskell-language-server.cabal cabal.project
110+
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
111+
src/**/*.hs exe/*.hs
112+
101113
- name: Retrieving `cabal.project` Hackage timestamp
102114
run: |
103115
# Form: index-state: 2021-11-29T08:11:08Z

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ jobs:
102102
echo "package floskell" >> cabal.project
103103
echo " ghc-options: -O0" >> cabal.project
104104
105-
# Shorten binary names as a workaround for filepath length limits in Windows,
106-
# but since tests are hardcoded on this workaround -
107-
# all platforms (in 2021-12-07) need it.
105+
# All workflows which distinquishes cache on `cabal.project` needs this.
108106
- name: Workaround shorten binary names
109107
run: |
110108
sed -i.bak -e 's/haskell-language-server/hls/g' \

0 commit comments

Comments
 (0)