From d6b4138a451ef4bd5072557a732108d95a4ce122 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 13 May 2024 08:49:59 -0400 Subject: [PATCH 1/4] chore: bump ikalnytskyi/action-setup-postgres to v6 Signed-off-by: Rui Chen --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d381cc..5837cab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: with: version: ${{ matrix.zig }} - name: Start services - uses: ikalnytskyi/action-setup-postgres@v4 + uses: ikalnytskyi/action-setup-postgres@v6 with: username: postgres password: postgres From 5f418a9c1f3df4e2ce788b973f06eda138fc4c6a Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 13 May 2024 08:55:05 -0400 Subject: [PATCH 2/4] ci: pin to use macos-13 Signed-off-by: Rui Chen --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5837cab..9df88a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] # macos-14 is arm runner zig: [0.12.0, master] steps: - uses: actions/checkout@v4 From 9f200735015d4194339aee6f08f7ed9f6c6a4c9d Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 13 May 2024 09:11:04 -0400 Subject: [PATCH 3/4] update macos runner condition check Signed-off-by: Rui Chen --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9df88a9..423bf10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,14 +47,14 @@ jobs: mysql root password: 'password' mysql user: 'developer' - name: mysql for macOS - if: matrix.os == 'macos-latest' + if: startsWith(matrix.os, 'macos') run: | node .github/ci.js - name: Install deps run: | make install-deps - name: Set pkg-config(macOS) - if: matrix.os == 'macos-latest' + if: startsWith(matrix.os, 'macos') run: | prefix=$(brew --prefix) echo "PKG_CONFIG_PATH=${prefix}/opt/libpq/lib/pkgconfig:${prefix}/opt/mysql-client/lib/pkgconfig" >> ${GITHUB_ENV} From a6248e896ff521f5258e7ae50a7504193f60dac5 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 13 May 2024 09:32:19 -0400 Subject: [PATCH 4/4] switch back to `macos-latest` Signed-off-by: Rui Chen fix build Signed-off-by: Rui Chen --- .github/workflows/ci.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 423bf10..d12ac8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13] # macos-14 is arm runner + os: [ubuntu-latest, macos-latest] # macos-latest is macos-14, which is arm runner zig: [0.12.0, master] steps: - uses: actions/checkout@v4 @@ -42,30 +42,39 @@ 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' - name: mysql for macOS - if: startsWith(matrix.os, 'macos') + if: matrix.os == 'macos-latest' run: | node .github/ci.js - name: Install deps run: | make install-deps - name: Set pkg-config(macOS) - if: startsWith(matrix.os, 'macos') + 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} + - 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 + zig build run-all -Dtarget=aarch64-macos --summary all + - name: Run examples(Windows) if: matrix.os == 'windows-latest' run: |