-
Notifications
You must be signed in to change notification settings - Fork 42
feat: fix CI for macos-latest #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,15 +22,15 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
os: [ubuntu-latest, macos-latest] # macos-latest is macos-14, which is arm runner | ||
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@v4 | ||
uses: ikalnytskyi/action-setup-postgres@v6 | ||
with: | ||
username: postgres | ||
password: postgres | ||
|
@@ -42,7 +42,7 @@ jobs: | |
with: | ||
character set server: 'utf8' | ||
collation server: 'utf8_general_ci' | ||
mysql version: '8.0' | ||
mysql version: '8.3' | ||
mysql database: 'public' | ||
mysql root password: 'password' | ||
mysql user: 'developer' | ||
|
@@ -57,15 +57,24 @@ jobs: | |
if: matrix.os == 'macos-latest' | ||
run: | | ||
prefix=$(brew --prefix) | ||
echo "PKG_CONFIG_PATH=${prefix}/opt/libpq/lib/pkgconfig:${prefix}/opt/mysql-client/lib/pkgconfig" >> ${GITHUB_ENV} | ||
echo "PKG_CONFIG_PATH=${prefix}/opt/sqlite/lib/pkgconfig:${prefix}/opt/libpq/lib/pkgconfig:${prefix}/opt/mysql-client/lib/pkgconfig" >> ${GITHUB_ENV} | ||
chenrui333 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Run examples(Unix) | ||
if: matrix.os != 'windows-latest' | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
pkg-config --libs --cflags libpq mysqlclient | ||
zig fmt --check src/ | ||
zig build | ||
zig build run-all --summary all | ||
|
||
- name: Run examples(macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
pkg-config --libs --cflags libpq mysqlclient | ||
zig fmt --check src/ | ||
zig build -Dtarget=aarch64-macos | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 本地没什么可以不用加? 如果有上下文可以放这里 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 需要加 target 是错的 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我准备 followup pr 把这个 pipeline split 一下 |
||
zig build run-all -Dtarget=aarch64-macos --summary all | ||
|
||
- name: Run examples(Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
|
Uh oh!
There was an error while loading. Please reload this page.