-
Notifications
You must be signed in to change notification settings - Fork 38
66 lines (52 loc) · 2.03 KB
/
Copy pathwindows.yml
File metadata and controls
66 lines (52 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Windows
on:
push:
paths-ignore:
- 'README.md'
- 'doc/**'
pull_request:
paths-ignore:
- 'README.md'
- 'doc/**'
jobs:
vs2022:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
cxx: [ "msvc", "clangcl" ]
env:
TAOPQ_TEST_DATABASE: host=localhost dbname=postgres user=postgres password=postgres
steps:
- uses: actions/checkout@v5
- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v8
- name: Set up MSVC dev cmd (x64)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Set up Conan
uses: conan-io/setup-conan@v1
with:
cache_packages: true
config_urls: .github/conan
- name: Install dependencies with Conan MSVC
run: conan install ${{ github.workspace }}/.github/conan/conanfile.py --build=missing -pr msvc --lockfile-partial
- name: Re-use Conan dependencies with MSVC
if: matrix.cxx == 'clangcl'
run: |
sed -i 's/set(CMAKE_CXX_COMPILER/# set(CMAKE_CXX_COMPILER/g' ${{ github.workspace }}/.github/conan/build/Release/generators/conan_toolchain.cmake
sed -i 's/set(CMAKE_C_COMPILER/# set(CMAKE_C_COMPILER/g' ${{ github.workspace }}/.github/conan/build/Release/generators/conan_toolchain.cmake
- name: CMake Configure
shell: pwsh
run: cmake --preset ${{ matrix.cxx }}-release-dev -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/taopq-install -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/conan/build/Release/generators/conan_toolchain.cmake
- name: Build project files
run: cmake --build --preset ${{ matrix.cxx }}-release-dev
- name: Run tests
run: cmake --build --preset ${{ matrix.cxx }}-release-dev --target test
- name: Run examples
run: cmake --build --preset ${{ matrix.cxx }}-release-dev --target examples
env:
PGDATABASE: ${{ env.TAOPQ_TEST_DATABASE }}
- name: Install Taocpp TaoPQ
run: cmake --build --preset ${{ matrix.cxx }}-release-dev --target install