CI: commit freetds.pc to repo, copy into pkgconfig dir before build #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_15.4.app | |
| - name: Install FreeTDS | |
| run: brew install freetds | |
| - name: Register freetds.pc with pkg-config | |
| # Homebrew's freetds doesn't ship a .pc file on macOS. | |
| # We ship one in the repo and symlink it into the pkgconfig directory. | |
| run: | | |
| mkdir -p /opt/homebrew/lib/pkgconfig | |
| cp ci/freetds.pc /opt/homebrew/lib/pkgconfig/freetds.pc | |
| pkg-config --cflags --libs freetds | |
| - name: Build | |
| run: swift build -v | |
| env: | |
| PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig | |
| - name: Test | |
| run: swift test -v | |
| env: | |
| PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig | |
| HOST: ${{ secrets.DB_HOST }} | |
| USERNAME: ${{ secrets.DB_USERNAME }} | |
| PASSWORD: ${{ secrets.DB_PASSWORD }} | |
| DATABASE: ${{ secrets.DB_DATABASE }} |