-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rui Chen <rui@chenrui.dev>
- Loading branch information
1 parent
141ec12
commit ccb4c7f
Showing
2 changed files
with
62 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI (macOS) | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '10 20 * * *' | ||
pull_request: | ||
paths: | ||
- "**.zig" | ||
- ".github/**" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**.zig" | ||
- ".github/**" | ||
|
||
jobs: | ||
examples: | ||
timeout-minutes: 10 | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zig: [0.12.0, master] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: ${{ matrix.zig }} | ||
- name: Start services | ||
uses: ikalnytskyi/action-setup-postgres@v6 | ||
with: | ||
username: postgres | ||
password: postgres | ||
database: postgres | ||
port: 5432 | ||
|
||
- name: Setup MySQL | ||
run: | | ||
node .github/ci.js | ||
- name: Install deps | ||
run: | | ||
make install-deps | ||
- name: Set pkg-config | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
prefix=$(brew --prefix) | ||
echo "PKG_CONFIG_PATH=${prefix}/opt/sqlite/lib/pkgconfig:${prefix}/opt/libpq/lib/pkgconfig:${prefix}/opt/mysql-client/lib/pkgconfig" >> ${GITHUB_ENV} | ||
- name: Run examples | ||
run: | | ||
pkg-config --libs --cflags libpq mysqlclient | ||
zig fmt --check src/ | ||
zig build -Dtarget=aarch64-macos | ||
zig build run-all -Dtarget=aarch64-macos --summary all |