Skip to content

Commit 4445238

Browse files
committed
CI: export PKG_CONFIG_PATH in same shell as swift build
1 parent c2c659f commit 4445238

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/swift.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,19 @@ jobs:
2121
- name: Install FreeTDS
2222
run: brew install freetds
2323

24-
- name: Register freetds.pc with pkg-config
25-
# Homebrew's freetds doesn't ship a .pc file on macOS.
26-
# We ship one in the repo and symlink it into the pkgconfig directory.
24+
- name: Build
2725
run: |
26+
export PKG_CONFIG_PATH="$(brew --prefix freetds)/lib/pkgconfig:/opt/homebrew/lib/pkgconfig"
2827
mkdir -p /opt/homebrew/lib/pkgconfig
2928
cp ci/freetds.pc /opt/homebrew/lib/pkgconfig/freetds.pc
30-
pkg-config --cflags --libs freetds
31-
32-
- name: Build
33-
run: swift build -v
34-
env:
35-
PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig
29+
echo "pkg-config check: $(pkg-config --cflags --libs freetds)"
30+
swift build -v
3631
3732
- name: Test
38-
run: swift test -v
33+
run: |
34+
export PKG_CONFIG_PATH="$(brew --prefix freetds)/lib/pkgconfig:/opt/homebrew/lib/pkgconfig"
35+
swift test -v
3936
env:
40-
PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig
4137
HOST: ${{ secrets.DB_HOST }}
4238
USERNAME: ${{ secrets.DB_USERNAME }}
4339
PASSWORD: ${{ secrets.DB_PASSWORD }}

0 commit comments

Comments
 (0)