Skip to content

Commit ce6b89d

Browse files
committed
install oneAPI basekit insead using the containers
1 parent 0660c56 commit ce6b89d

File tree

2 files changed

+18
-233
lines changed

2 files changed

+18
-233
lines changed

.github/workflows/basic.yml

Lines changed: 17 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -11,78 +11,6 @@ env:
1111
UMF_VERSION: 0.1.0
1212

1313
jobs:
14-
icx-build:
15-
# TODO: we could merge ICX build with gcc/clang (using our dockers) Issue: #259
16-
name: Intel C++ Compiler
17-
strategy:
18-
matrix:
19-
build_type: [Debug, Release]
20-
compiler: [{c: icx, cxx: icpx}]
21-
shared_library: ['OFF']
22-
env:
23-
BUILD_DIR : "${{github.workspace}}/build/"
24-
INSTL_DIR : "${{github.workspace}}/../install-dir"
25-
26-
runs-on: ubuntu-22.04
27-
container:
28-
image: intel/oneapi:latest
29-
volumes:
30-
- ${{github.workspace}}:${{github.workspace}}
31-
options: "--privileged"
32-
33-
steps:
34-
- name: Checkout
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36-
37-
- name: Install apt packages
38-
run: |
39-
apt-get update
40-
apt-get install -y libnuma-dev libjemalloc-dev libtbb-dev libhwloc-dev python3-pip sudo
41-
42-
- name: Install Python requirements
43-
run: python3 -m pip install -r third_party/requirements.txt
44-
45-
- name: Set ptrace value for IPC test
46-
run: bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
47-
48-
- name: Configure build
49-
run: >
50-
cmake
51-
-B build
52-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
53-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
54-
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
55-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
56-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
57-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
58-
-DUMF_FORMAT_CODE_STYLE=OFF
59-
-DUMF_DEVELOPER_MODE=ON
60-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
61-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
62-
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
63-
-DUMF_BUILD_EXAMPLES=ON
64-
-DUMF_TESTS_FAIL_ON_SKIP=ON
65-
66-
- name: Build UMF
67-
run: cmake --build build -j $(nproc)
68-
69-
- name: Run tests
70-
working-directory: ${{github.workspace}}/build
71-
run: ctest --output-on-failure --test-dir test
72-
73-
- name: Test UMF installation and uninstallation
74-
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
75-
run: >
76-
python3 ${{github.workspace}}/test/test_installation.py
77-
--build-dir ${{env.BUILD_DIR}}
78-
--install-dir ${{env.INSTL_DIR}}
79-
--build-type ${{matrix.build_type}}
80-
--disjoint-pool
81-
--jemalloc-pool
82-
--scalable-pool
83-
--umf-version ${{env.UMF_VERSION}}
84-
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
85-
8614
ubuntu-build:
8715
name: Ubuntu
8816
strategy:
@@ -119,6 +47,12 @@ jobs:
11947
compiler: {c: gcc, cxx: g++}
12048
shared_library: 'OFF'
12149
level_zero_provider: 'OFF'
50+
# test icx compiler
51+
- os: 'ubuntu-22.04'
52+
build_type: Release
53+
compiler: {c: icx, cxx: icpx}
54+
shared_library: 'OFF'
55+
level_zero_provider: 'ON'
12256
env:
12357
BUILD_DIR : "${{github.workspace}}/build/"
12458
INSTL_DIR : "${{github.workspace}}/../install-dir"
@@ -128,6 +62,16 @@ jobs:
12862
- name: Checkout
12963
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
13064

65+
- name: Install oneAPI basekit
66+
if: matrix.compiler.cxx == 'icpx'
67+
run: |
68+
sudo apt update
69+
sudo apt install -y gpg-agent wget
70+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
71+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
72+
sudo apt update
73+
sudo apt install intel-basekit
74+
13175
- name: Install apt packages
13276
run: |
13377
sudo apt-get update
@@ -145,6 +89,7 @@ jobs:
14589

14690
- name: Configure build
14791
run: >
92+
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh && ' || ''}}
14893
cmake
14994
-B ${{env.BUILD_DIR}}
15095
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"

.github/workflows/pr_push.yml

Lines changed: 1 addition & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -11,166 +11,6 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
FastBuild:
15-
name: Fast build
16-
env:
17-
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
18-
strategy:
19-
matrix:
20-
include:
21-
- os: windows-latest
22-
disjoint: 'OFF'
23-
build_tests: 'ON'
24-
# pure C build (Windows)
25-
- os: windows-latest
26-
disjoint: 'OFF'
27-
# Tests' building is off for a pure C build
28-
build_tests: 'OFF'
29-
- os: ubuntu-latest
30-
disjoint: 'ON'
31-
build_tests: 'ON'
32-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
33-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
34-
# pure C build (Linux)
35-
- os: ubuntu-latest
36-
disjoint: 'OFF'
37-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
38-
# Tests' building is off for a pure C build
39-
build_tests: 'OFF'
40-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
41-
runs-on: ${{matrix.os}}
42-
43-
steps:
44-
- name: Checkout repository
45-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
46-
47-
- name: Initialize vcpkg
48-
if: matrix.os == 'windows-latest'
49-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
50-
with:
51-
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
52-
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
53-
vcpkgJsonGlob: '**/vcpkg.json'
54-
55-
- name: Install dependencies
56-
if: matrix.os == 'windows-latest'
57-
run: vcpkg install
58-
shell: pwsh # Specifies PowerShell as the shell for running the script.
59-
60-
- name: Install apt packages
61-
if: matrix.os == 'ubuntu-latest'
62-
run: |
63-
sudo apt-get update
64-
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev
65-
66-
- name: Set ptrace value for IPC test (on Linux only)
67-
if: matrix.os == 'ubuntu-latest'
68-
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
69-
70-
- name: Configure CMake
71-
run: >
72-
cmake
73-
-B ${{github.workspace}}/build
74-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
75-
-DUMF_FORMAT_CODE_STYLE=OFF
76-
-DUMF_DEVELOPER_MODE=ON
77-
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
78-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
79-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
80-
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
81-
-DUMF_BUILD_EXAMPLES=ON
82-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
83-
-DUMF_TESTS_FAIL_ON_SKIP=ON
84-
${{matrix.extra_build_options}}
85-
86-
- name: Build
87-
run: cmake --build ${{github.workspace}}/build --config Release -j
88-
89-
- name: Run examples
90-
working-directory: ${{github.workspace}}/build
91-
run: ctest --output-on-failure --test-dir examples -C Release
92-
93-
- name: Run tests
94-
if: matrix.build_tests == 'ON'
95-
working-directory: ${{github.workspace}}/build
96-
run: ctest --output-on-failure --test-dir test -C Release
97-
98-
CodeStyle:
99-
name: Coding style
100-
runs-on: ubuntu-latest
101-
102-
steps:
103-
- name: Checkout repository
104-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
105-
106-
- name: Install apt packages
107-
run: |
108-
sudo apt-get update
109-
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev
110-
111-
- name: Configure CMake
112-
run: >
113-
cmake
114-
-B ${{github.workspace}}/build
115-
-DUMF_FORMAT_CODE_STYLE=ON
116-
-DUMF_BUILD_TESTS=OFF
117-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
118-
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=OFF
119-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF
120-
121-
- name: Check C/C++ formatting
122-
run: cmake --build build --target clang-format-check
123-
124-
- name: Check CMake formatting
125-
run: cmake --build build --target cmake-format-check
126-
127-
- name: Check Python formatting
128-
run: cmake --build build --target black-format-check
129-
130-
DocsBuild:
131-
name: Build docs
132-
runs-on: ubuntu-latest
133-
134-
steps:
135-
- name: Checkout repository
136-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
137-
138-
- name: Install doxygen
139-
run: |
140-
sudo apt-get update
141-
sudo apt-get install -y doxygen
142-
143-
- name: Install pip requirements
144-
run: python3 -m pip install -r third_party/requirements.txt
145-
146-
- name: Build the documentation
147-
working-directory: scripts
148-
run: python3 generate_docs.py
149-
150-
Spellcheck:
151-
uses: ./.github/workflows/spellcheck.yml
15214
Build:
15315
name: Basic builds
154-
needs: [Spellcheck, FastBuild, CodeStyle]
155-
uses: ./.github/workflows/basic.yml
156-
Sanitizers:
157-
needs: [Spellcheck, FastBuild, CodeStyle]
158-
uses: ./.github/workflows/sanitizers.yml
159-
Benchmarks:
160-
needs: [Build]
161-
uses: ./.github/workflows/benchmarks.yml
162-
ProxyLib:
163-
needs: [Build]
164-
uses: ./.github/workflows/proxy_lib.yml
165-
GPU:
166-
needs: [Build]
167-
uses: ./.github/workflows/gpu.yml
168-
Qemu:
169-
needs: [Build]
170-
uses: ./.github/workflows/qemu.yml
171-
Valgrind:
172-
needs: [Build]
173-
uses: ./.github/workflows/valgrind.yml
174-
MultiNuma:
175-
needs: [Build]
176-
uses: ./.github/workflows/multi_numa.yml
16+
uses: ./.github/workflows/basic.yml

0 commit comments

Comments
 (0)