Skip to content

Commit 8229354

Browse files
igchorkswiecicki
authored andcommitted
[CI] Install hwloc on CI (UMF dependency)
1 parent 6ca745c commit 8229354

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ ARG BASE_DEPS="\
3232
ARG UR_DEPS="\
3333
doxygen \
3434
python3 \
35-
python3-pip"
35+
python3-pip \
36+
libhwloc-dev"
3637

3738
# Unified Runtime's dependencies (installed via pip)
3839
ARG UR_PYTHON_DEPS="\

.github/scripts/install_hwloc.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2024 Intel Corporation
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
8+
# install_hwloc.sh - Script for building and installing HWLOC library from source code
9+
10+
set -e
11+
12+
git clone -b hwloc-2.3.0 https://github.com/open-mpi/hwloc.git
13+
pushd hwloc
14+
./autogen.sh
15+
./configure
16+
make -j$(nproc)
17+
sudo make install -j$(nproc)
18+
popd

.github/workflows/cmake.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
sudo apt-get update
4848
sudo apt-get install -y doxygen ${{matrix.compiler.c}}
4949
50+
- name: Install libhwloc
51+
run: .github/scripts/install_hwloc.sh
52+
5053
- name: Install g++-7
5154
if: matrix.compiler.cxx == 'g++-7'
5255
run: |
@@ -224,11 +227,17 @@ jobs:
224227
Expand-Archive -Path "$WorkingDir\doxygen.zip"
225228
Add-Content $env:GITHUB_PATH "$WorkingDir\doxygen"
226229
230+
- name: Install hwloc
231+
run: vcpkg install hwloc:x64-windows
232+
227233
- name: Configure CMake
234+
env:
235+
VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows"
228236
run: >
229237
cmake
230238
-B${{github.workspace}}/build
231239
${{matrix.toolset}}
240+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
232241
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
233242
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
234243
-DCMAKE_POLICY_DEFAULT_CMP0094=NEW
@@ -267,6 +276,9 @@ jobs:
267276
- name: Install prerequisites
268277
run: python3 -m pip install -r third_party/requirements.txt
269278

279+
- name: Install hwloc
280+
run: brew install hwloc
281+
270282
- name: Configure CMake
271283
run: >
272284
cmake

.github/workflows/codeql.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
- name: Install pip packages
3232
run: pip install -r third_party/requirements.txt
3333

34+
- name: Install apt packages
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y libhwloc-dev
38+
3439
- name: Configure CMake
3540
run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON
3641

@@ -61,8 +66,13 @@ jobs:
6166
- name: Install pip packages
6267
run: python3 -m pip install -r third_party/requirements.txt
6368

69+
- name: Install hwloc
70+
run: vcpkg install hwloc:x64-windows
71+
6472
- name: Configure CMake
65-
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON
73+
env:
74+
VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows"
75+
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
6676

6777
- name: Build
6878
run: cmake --build ${{github.workspace}}/build -j $(nproc) --config Release

.github/workflows/coverity.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
- name: Install pip packages
3939
run: pip install -r third_party/requirements.txt
4040

41+
- name: Install apt packages
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y libhwloc-dev
45+
4146
- name: Configure CMake
4247
run: >
4348
cmake

0 commit comments

Comments
 (0)