Skip to content

Commit d09e41a

Browse files
author
Aliaksandr Adziareika
committed
<TBBAS-2530> Add Windows dependencies
1 parent 97559b4 commit d09e41a

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Setup build tools on Windows
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install Chocolatey (if not installed)
7+
shell: pwsh
8+
run: |
9+
if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
10+
Set-ExecutionPolicy Bypass -Scope Process -Force
11+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
12+
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
13+
}
14+
15+
- name: Install CMake 4
16+
shell: pwsh
17+
run: |
18+
choco install cmake --version=4.0.3 --installargs '"ADD_CMAKE_TO_PATH=System"' -y
19+
20+
- name: Clone vcpkg
21+
shell: pwsh
22+
run: |
23+
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
24+
C:\vcpkg\bootstrap-vcpkg.bat
25+
26+
- name: Install fmt via vcpkg
27+
shell: pwsh
28+
run: |
29+
C:\vcpkg\vcpkg install fmt:x64-windows
30+
31+
- name: Set CMake toolchain file for vcpkg
32+
shell: pwsh
33+
run: |
34+
echo "VCPKG_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" > $env:GITHUB_ENV

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,9 @@ jobs:
3939
with:
4040
opendaq-framework-package-filename: ${{ steps.opendaq-framework.outputs.artefact }}
4141

42-
- name: Setup cmake
42+
- name: Install Windows dependencies
4343
if: runner.os == 'Windows'
44-
uses: jwlawson/actions-setup-cmake@v2
45-
with:
46-
cmake-version: '4.0'
47-
48-
- name: Install ninja-build
49-
if: runner.os == 'Windows'
50-
uses: seanmiddleditch/gha-setup-ninja@v5
44+
uses: ./.github/actions/dependencies-install
5145

5246
- name: Configure simple device module with CMake
5347
run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release

0 commit comments

Comments
 (0)