Skip to content

Commit 1a092e7

Browse files
kleisaukerolandlo
authored andcommitted
Fix CI on Apple Silicon
The `macos-latest` image now uses macOS 14 on an M1 runner. On M1 Macs, Homebrew installs into `/opt/homebrew` by default and no longer links into `/usr/local`. Therefore, we need to explicitly set `DYLD_LIBRARY_PATH` to `/opt/homebrew/lib` to ensure the dynamic linker can find libvips.
1 parent 8506b5a commit 1a092e7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/ci.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ jobs:
2121

2222
- uses: leafo/gh-actions-luarocks@v4
2323

24-
- name: Install libvips
24+
- name: Install Ubuntu dependencies
25+
if: runner.os == 'Linux'
2526
run: |
26-
if [[ ${{ matrix.os }} == macos* ]]; then
27-
brew install vips
28-
elif [[ ${{ matrix.os }} == ubuntu* ]]; then
29-
sudo apt update
30-
sudo apt install --no-install-recommends libvips-dev
31-
fi
27+
sudo apt-get update
28+
sudo apt-get install --no-install-recommends libvips-dev
29+
30+
- name: Install macOS dependencies
31+
if: runner.os == 'macOS'
32+
run: |
33+
brew install vips
34+
echo "DYLD_LIBRARY_PATH=$(brew --prefix vips)/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
3235
3336
- name: Install lua-vips
3437
run: |

0 commit comments

Comments
 (0)