Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vaintroub committed Sep 6, 2023
1 parent 9516be4 commit c5566bc
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/ninja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,43 @@ jobs:
os: [windows-latest,ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: Build/${{ matrix.os }}
env:
CMAKE_VCPKG_PARAMS: ${{ contains(matrix.os, 'windows') && '-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release' || ' ' }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: install client drivers (macOS)
if: contains(matrix.os, 'macos')
run : |
HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client libpq
brew link --force mysql-client
# On Windows, use vcpkg to build, as pgsql driver on build box is bad (crashes during tests)
- name: vcpkg_cache(Windows)
uses: actions/cache@v3
if: contains(matrix.os, 'windows')
id: vcpkg_cache
with:
path: ~\AppData\Local\vcpkg
key: ${{ runner.os }}-vcpkg-libpq-zlib
- name: vcpkg install(Windows)
if: contains(matrix.os, 'windows')
run: vcpkg install libpq zlib --triplet=x64-windows-release

- name: configure
run: cmake . -DWITH_PGSQL=1
run: cmake . -DWITH_PGSQL=1 -DCMAKE_COMPILE_WARNING_AS_ERROR=1 ${{ env.CMAKE_VCPKG_PARAMS }}

- name: build package
run: cmake --build . --config Release --target package -j

- name: upload package(Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: {{matrix.os}}-package
path: *.zip

- name: test_install
run: |
cmake --install . --config Release --prefix install_dir
Expand Down

0 comments on commit c5566bc

Please sign in to comment.