Skip to content

Commit bb22728

Browse files
committed
Install gtest and build tests
1 parent 4cb589e commit bb22728

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/c-cpp.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ permissions: read-all
1111
jobs:
1212
build-windows-msvc:
1313
runs-on: windows-latest
14+
env:
15+
PKG_CONFIG: ${{ github.workspace }}/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
16+
PKG_CONFIG_PATH: ${{ github.workspace }}/vcpkg/installed/x64-windows/lib/pkgconfig
1417

1518
steps:
1619
- uses: actions/checkout@v4
@@ -33,9 +36,15 @@ jobs:
3336
python -m pip install --upgrade pip
3437
pip install meson ninja
3538
39+
- name: Setup vcpkg and install pkg-config and gtest
40+
run: |
41+
git clone https://github.com/Microsoft/vcpkg.git
42+
.\vcpkg\bootstrap-vcpkg.bat
43+
.\vcpkg\vcpkg install gtest:x64-windows pkgconf:x64-windows
44+
3645
# Configure and build with Meson (MSVC will be used automatically)
3746
- name: Configure (Meson)
38-
run: meson setup --warnlevel 2 --buildtype release builddir --backend=ninja
47+
run: meson setup -Dbuild_tests=true --warnlevel 2 --buildtype release builddir --backend=ninja
3948

4049
- name: Build (Ninja)
4150
run: ninja -C builddir

0 commit comments

Comments
 (0)