Skip to content

Commit 147e73d

Browse files
committed
Install hwloc on Windows using Vcpkg
Co-developed-by: Krzysztof Filipek <[email protected]> Signed-off-by: Lukasz Dorau <[email protected]>
1 parent ab8f1f5 commit 147e73d

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

.github/workflows/basic.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ jobs:
174174

175175
windows-build:
176176
name: Windows
177+
env:
178+
HWLOC_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows"
177179
strategy:
178180
matrix:
179181
os: ['windows-2019', 'windows-2022']
@@ -208,11 +210,23 @@ jobs:
208210
- name: Checkout
209211
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
210212

213+
- name: Initialize vcpkg
214+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
215+
with:
216+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
217+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
218+
vcpkgJsonGlob: '**/vcpkg.json'
219+
220+
- name: Install dependencies
221+
run: vcpkg install
222+
shell: pwsh # Specifies PowerShell as the shell for running the script.
223+
211224
- name: Configure build
212225
run: >
213226
cmake
214227
-B ${{env.BUILD_DIR}}
215228
${{matrix.toolset}}
229+
-DCMAKE_PREFIX_PATH=${{env.HWLOC_PATH}}
216230
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
217231
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
218232
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}

.github/workflows/codeql.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
name: Analyze
2020
permissions:
2121
security-events: write
22+
env:
23+
HWLOC_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows"
2224
strategy:
2325
fail-fast: false
2426
matrix:
@@ -41,6 +43,19 @@ jobs:
4143
with:
4244
languages: cpp
4345

46+
- name: Initialize vcpkg
47+
if: ${{ matrix.os == 'windows-latest' }}
48+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
49+
with:
50+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
51+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
52+
vcpkgJsonGlob: '**/vcpkg.json'
53+
54+
- name: Install dependencies
55+
if: ${{ matrix.os == 'windows-latest' }}
56+
run: vcpkg install
57+
shell: pwsh # Specifies PowerShell as the shell for running the script.
58+
4459
- name: Install apt packages
4560
if: matrix.os == 'ubuntu-latest'
4661
run: |
@@ -55,6 +70,7 @@ jobs:
5570
cmake
5671
-B ${{github.workspace}}/build
5772
${{matrix.extra_build_option}}
73+
-DCMAKE_PREFIX_PATH=${{env.HWLOC_PATH}}
5874
-DUMF_FORMAT_CODE_STYLE=OFF
5975
-DUMF_DEVELOPER_MODE=ON
6076
-DUMF_ENABLE_POOL_TRACKING=ON

.github/workflows/pr_push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ permissions:
1313
jobs:
1414
FastBuild:
1515
name: Fast build
16+
env:
17+
HWLOC_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows"
1618
strategy:
1719
matrix:
1820
include:
@@ -47,6 +49,19 @@ jobs:
4749
- name: Checkout repository
4850
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4951

52+
- name: Initialize vcpkg
53+
if: ${{ matrix.os == 'windows-latest' }}
54+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
55+
with:
56+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
57+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
58+
vcpkgJsonGlob: '**/vcpkg.json'
59+
60+
- name: Install dependencies
61+
if: ${{ matrix.os == 'windows-latest' }}
62+
run: vcpkg install
63+
shell: pwsh # Specifies PowerShell as the shell for running the script.
64+
5065
- name: Install apt packages
5166
if: matrix.os == 'ubuntu-latest'
5267
run: |
@@ -57,6 +72,7 @@ jobs:
5772
run: >
5873
cmake
5974
-B ${{github.workspace}}/build
75+
-DCMAKE_PREFIX_PATH=${{env.HWLOC_PATH}}
6076
-DUMF_FORMAT_CODE_STYLE=OFF
6177
-DUMF_DEVELOPER_MODE=ON
6278
-DUMF_ENABLE_POOL_TRACKING=ON

.github/workflows/sanitizers.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ jobs:
108108

109109
windows-build:
110110
name: cl and clang-cl on Windows
111+
env:
112+
HWLOC_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows"
111113
strategy:
112114
matrix:
113115
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
@@ -131,12 +133,24 @@ jobs:
131133
arch: x64
132134
toolset: 14.38.33130
133135

136+
- name: Initialize vcpkg
137+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
138+
with:
139+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
140+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
141+
vcpkgJsonGlob: '**/vcpkg.json'
142+
143+
- name: Install dependencies
144+
run: vcpkg install
145+
shell: pwsh # Specifies PowerShell as the shell for running the script.
146+
134147
- name: Configure build
135148
run: >
136149
cmake
137150
-B ${{env.BUILD_DIR}}
138151
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
139152
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
153+
-DCMAKE_PREFIX_PATH=${{env.HWLOC_PATH}}
140154
-DUMF_BUILD_SHARED_LIBRARY=OFF
141155
-DUMF_ENABLE_POOL_TRACKING=OFF
142156
-DUMF_FORMAT_CODE_STYLE=OFF

vcpkg.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "main",
3+
"version-string": "2.10.0",
4+
"dependencies": [
5+
"hwloc"
6+
]
7+
}

0 commit comments

Comments
 (0)