Skip to content

Commit 9cda0d3

Browse files
authored
Jit eror ci fixes (#4917)
* only conditionally link libb2, and fix jit binary cache keys
1 parent 043a202 commit 9cda0d3

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/ci-build-jit-binary.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ jobs:
5454
with:
5555
name: jit-source
5656
path: ${{ env.jit_src }}
57-
57+
5858
- name: cache/restore jit binaries
5959
id: cache-jit-binaries
6060
uses: actions/cache/restore@v4
6161
with:
6262
path: ${{ env.jit_dist }}
63-
key: jit-dist_${{matrix.os}}.racket_${{env.racket_version}}.jit-src_${{hashFiles(format('{0}/**.rkt',env.jit_src),format('{0}/**.ss',env.jit_src))}}.yaml_${{hashFiles('**/ci-build-jit-binary.yaml')}}
63+
key: jit-dist_${{matrix.os}}.racket_${{env.racket_version}}.jit-src_${{hashFiles(format('{0}/**/*.rkt',env.jit_src),format('{0}/**/*.ss',env.jit_src))}}.yaml_${{hashFiles('**/ci-build-jit-binary.yaml')}}
6464

6565
- name: cache racket dependencies
6666
if: steps.cache-jit-binaries.outputs.cache-hit != 'true'
@@ -81,8 +81,18 @@ jobs:
8181
if: runner.os == 'macOS' && steps.cache-jit-binaries.outputs.cache-hit != 'true'
8282
run: |
8383
brew install libb2
84-
racket_lib_dir="$(dirname "$(readlink -f "$(which raco)")")/../lib"
85-
ln -s "$(brew --prefix)"/lib/libb2.*.dylib "$racket_lib_dir/"
84+
brew_lib_dir=$(brew --prefix)/lib
85+
racket_lib_dir=$(dirname $(dirname $(readlink -f $(which raco))))/lib
86+
87+
# link libb2 if not already present/cached
88+
for dll in $brew_lib_dir/libb2.*.dylib; do
89+
file=$(basename "$dll")
90+
if [ ! -e "$racket_lib_dir/$file" ]; then
91+
ln -s "$brew_lib_dir/$file" "$racket_lib_dir/$file"
92+
else
93+
echo "$racket_lib_dir/$file" already exists.
94+
fi
95+
done
8696
8797
- name: build jit binary
8898
if: steps.cache-jit-binaries.outputs.cache-hit != 'true'
@@ -104,7 +114,7 @@ jobs:
104114
uses: actions/cache/save@v4
105115
with:
106116
path: ${{ env.jit_dist }}
107-
key: jit-dist_${{matrix.os}}.racket_${{env.racket_version}}.jit-src_${{hashFiles(format('{0}/**.rkt',env.jit_src),format('{0}/**.ss',env.jit_src))}}.yaml_${{hashFiles('**/ci-build-jit-binary.yaml')}}
117+
key: jit-dist_${{matrix.os}}.racket_${{env.racket_version}}.jit-src_${{hashFiles(format('{0}/**/*.rkt',env.jit_src),format('{0}/**/*.ss',env.jit_src))}}.yaml_${{hashFiles('**/ci-build-jit-binary.yaml')}}
108118

109119
- name: save jit binary
110120
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)