Skip to content

Commit 6483d96

Browse files
committed
CI: {caching,bench}: add executable patching for cache
1 parent 999c872 commit 6483d96

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/bench.yml

+9
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

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

.github/workflows/test.yml

+1-3
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)