Skip to content

Commit b8ab9e0

Browse files
committed
CI: set PKG_CONFIG_PATH and PATH for Homebrew on macos-14 runner
1 parent 061dfc0 commit b8ab9e0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/swift.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ jobs:
1919
run: sudo xcode-select -s /Applications/Xcode_15.4.app
2020

2121
- name: Install FreeTDS
22-
run: brew install pkg-config freetds
22+
run: brew install freetds
23+
24+
- name: Set Homebrew environment
25+
# On macos-14 (Apple Silicon), Homebrew installs to /opt/homebrew.
26+
# PKG_CONFIG_PATH must be set so SPM's systemLibrary target can run
27+
# `pkg-config freetds` and find the FreeTDS .pc file.
28+
# GITHUB_ENV persists these variables for all subsequent steps.
29+
run: |
30+
echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig" >> $GITHUB_ENV
31+
echo "PATH=/opt/homebrew/bin:$PATH" >> $GITHUB_ENV
2332
2433
- name: Build
2534
run: swift build -v
@@ -33,4 +42,4 @@ jobs:
3342
HOST: ${{ secrets.DB_HOST }}
3443
USERNAME: ${{ secrets.DB_USERNAME }}
3544
PASSWORD: ${{ secrets.DB_PASSWORD }}
36-
DATABASE: ${{ secrets.DB_DATABASE }}
45+
DATABASE: ${{ secrets.DB_DATABASE }}

0 commit comments

Comments
 (0)