99jobs :
1010 build :
1111 name : Build & Test
12- runs-on : macos-14 # Apple Silicon runner, Xcode 15+
12+ runs-on : macos-14
1313
1414 steps :
1515 - name : Checkout
@@ -21,24 +21,31 @@ jobs:
2121 - name : Install FreeTDS
2222 run : brew install freetds
2323
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.
24+ - name : Diagnose environment
2925 run : |
30- echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig" >> $GITHUB_ENV
31- echo "PATH=/opt/homebrew/bin:$PATH" >> $GITHUB_ENV
26+ echo "=== which pkg-config ==="
27+ which pkg-config || echo "NOT FOUND"
28+ echo "=== pkg-config freetds ==="
29+ pkg-config --cflags --libs freetds || echo "pkg-config freetds FAILED"
30+ echo "=== PKG_CONFIG_PATH ==="
31+ echo "${PKG_CONFIG_PATH:-empty}"
32+ echo "=== .pc files ==="
33+ find /opt/homebrew /usr/local -name "freetds.pc" 2>/dev/null || echo "no .pc file found"
34+ echo "=== brew --prefix freetds ==="
35+ brew --prefix freetds
36+ echo "=== ls pkgconfig dirs ==="
37+ ls /opt/homebrew/lib/pkgconfig/ 2>/dev/null | grep -i free || echo "none"
38+ ls /usr/local/lib/pkgconfig/ 2>/dev/null | grep -i free || echo "none"
3239
3340 - name : Build
3441 run : swift build -v
42+ env :
43+ PKG_CONFIG_PATH : /opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig
3544
3645 - name : Test
3746 run : swift test -v
3847 env :
39- # Integration tests are skipped automatically when these are not set.
40- # To run them, add HOST / USERNAME / PASSWORD / DATABASE as
41- # GitHub Actions secrets (Settings → Secrets → Actions).
48+ PKG_CONFIG_PATH : /opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig
4249 HOST : ${{ secrets.DB_HOST }}
4350 USERNAME : ${{ secrets.DB_USERNAME }}
4451 PASSWORD : ${{ secrets.DB_PASSWORD }}
0 commit comments