-
Notifications
You must be signed in to change notification settings - Fork 47
94 lines (79 loc) · 3.59 KB
/
Copy pathreusable_proxy_lib.yml
File metadata and controls
94 lines (79 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Builds libumf_proxy and runs tests with it
name: Proxy library
on: workflow_call
permissions:
contents: read
env:
BUILD_DIR : "${{github.workspace}}/build"
INSTL_DIR : "${{github.workspace}}/install-dir"
COVERAGE_DIR : "${{github.workspace}}/coverage"
COVERAGE_NAME : "exports-coverage-proxy"
jobs:
proxy-ubuntu:
strategy:
matrix:
build_type: [Release, Debug]
compiler: [{c: gcc, cxx: g++}]
proxy_lib_pool: ['SCALABLE', 'JEMALLOC']
name: Proxy Library (ubuntu-22.04, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, proxy_lib_pool=${{matrix.proxy_lib_pool}})
runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev lcov
- name: Configure build
run: >
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUMF_BUILD_SHARED_LIBRARY=ON
-DUMF_BUILD_BENCHMARKS=OFF
-DUMF_BUILD_TESTS=ON
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_TESTS_FAIL_ON_SKIP=ON
-DUMF_PROXY_LIB_BASED_ON_POOL=${{matrix.proxy_lib_pool}}
${{ matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
- name: Build UMF
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
- name: Run "ctest --output-on-failure" with proxy library
working-directory: ${{env.BUILD_DIR}}
run: LD_PRELOAD=./lib/libumf_proxy.so ctest --output-on-failure
- name: Run "./test/test_memoryPool" with proxy library
working-directory: ${{env.BUILD_DIR}}
run: LD_PRELOAD=./lib/libumf_proxy.so ./test/test_memoryPool
- name: Run "/usr/bin/ls" with proxy library
working-directory: ${{env.BUILD_DIR}}
run: UMF_PROXY="page.disposition=shared-fd" LD_PRELOAD=./lib/libumf_proxy.so /usr/bin/ls
- name: Run "/usr/bin/date" with proxy library
working-directory: ${{env.BUILD_DIR}}
run: UMF_PROXY="page.disposition=shared-shm" LD_PRELOAD=./lib/libumf_proxy.so /usr/bin/date
- name: Run "ctest --output-on-failure" with proxy library and size.threshold=128
working-directory: ${{env.BUILD_DIR}}
run: >
UMF_PROXY="page.disposition=shared-shm;size.threshold=128"
LD_PRELOAD=./lib/libumf_proxy.so
ctest --output-on-failure
- name: Check coverage
if: ${{ matrix.build_type == 'Debug' }}
working-directory: ${{env.BUILD_DIR}}
run: |
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-proxy_lib_pool-${{matrix.proxy_lib_pool}}
echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
mkdir -p ${{env.COVERAGE_DIR}}
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ matrix.build_type == 'Debug' }}
with:
name: ${{env.COVERAGE_NAME}}-proxy_lib_pool-${{matrix.proxy_lib_pool}}
path: ${{env.COVERAGE_DIR}}