Skip to content

Commit

Permalink
Fix CI on Apple Silicon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kleisauke authored and rolandlo committed May 18, 2024
1 parent 8506b5a commit 1a092e7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ jobs:

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

- name: Install libvips
- name: Install Ubuntu dependencies
if: runner.os == 'Linux'
run: |
if [[ ${{ matrix.os }} == macos* ]]; then
brew install vips
elif [[ ${{ matrix.os }} == ubuntu* ]]; then
sudo apt update
sudo apt install --no-install-recommends libvips-dev
fi
sudo apt-get update
sudo apt-get install --no-install-recommends libvips-dev
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew install vips
echo "DYLD_LIBRARY_PATH=$(brew --prefix vips)/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Install lua-vips
run: |
Expand Down

0 comments on commit 1a092e7

Please sign in to comment.