1
- # Fast builds
1
+ # Fast build linux part is working in dockers, Windows is not
2
2
name : FastBuild
3
3
4
4
on : workflow_call
5
5
6
6
permissions :
7
7
contents : read
8
+ packages : read
8
9
9
10
env :
10
11
BUILD_DIR : " ${{github.workspace}}/build"
11
12
INSTL_DIR : " ${{github.workspace}}/install-dir"
12
13
13
14
jobs :
14
- FastBuild :
15
- name : Fast builds
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"
15
+ ubuntu-build :
16
+ name : Linux
17
+ runs-on : ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-22.04' }}
18
+ container :
19
+ image : ghcr.io/bb-ur/umf-${{ matrix.os }}:latest
20
+ options : --user test_user --privileged
21
+ volumes :
22
+ - ${{ github.workspace }}:${{ github.workspace }}
18
23
strategy :
19
24
matrix :
20
25
include :
21
- - os : windows-latest
26
+ - os : ' ubuntu-22.04 '
22
27
build_tests : ' ON'
28
+ extra_build_options : ' -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
23
29
simple_cmake : ' OFF'
24
- # pure C build (Windows)
25
- - os : windows-latest
30
+ # pure C build
31
+ - os : ' ubuntu-22.04 '
26
32
# Tests' building is off for a pure C build
27
33
build_tests : ' OFF'
34
+ extra_build_options : ' -DUMF_BUILD_BENCHMARKS=ON'
28
35
simple_cmake : ' OFF'
29
- - os : ubuntu-latest
36
+ # simplest CMake on Ubuntu 22.04, 24.04
37
+ - os : ' ubuntu-22.04'
30
38
build_tests : ' ON'
31
- # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
32
- extra_build_options : ' -DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
33
- simple_cmake : ' OFF'
34
- # pure C build (Linux)
35
- - os : ubuntu-latest
36
- # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
37
- # Tests' building is off for a pure C build
38
- build_tests : ' OFF'
39
- extra_build_options : ' -DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
40
- simple_cmake : ' OFF'
41
- # simplest CMake on ubuntu-latest
42
- - os : ubuntu-latest
43
- build_tests : ' ON'
44
- extra_build_options : ' -DCMAKE_BUILD_TYPE=Release'
45
39
simple_cmake : ' ON'
46
- # simplest CMake ubuntu-22.04
47
- - os : ubuntu-22.04
40
+ - os : ubuntu-24.04
48
41
build_tests : ' ON'
49
- extra_build_options : ' -DCMAKE_BUILD_TYPE=Release'
50
42
simple_cmake : ' ON'
51
- runs-on : ${{ (matrix.os == 'ubuntu-latest' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }}
43
+
44
+ steps :
45
+ - name : Checkout repository
46
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47
+ with :
48
+ fetch-depth : 0
49
+
50
+ - name : Configure CMake
51
+ if : matrix.simple_cmake == 'OFF'
52
+ run : >
53
+ cmake
54
+ -B ${{env.BUILD_DIR}}
55
+ -DCMAKE_BUILD_TYPE=Release
56
+ -DUMF_FORMAT_CODE_STYLE=OFF
57
+ -DUMF_DEVELOPER_MODE=ON
58
+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
59
+ -DUMF_BUILD_TESTS=${{matrix.build_tests}}
60
+ -DUMF_BUILD_EXAMPLES=ON
61
+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
62
+ -DUMF_BUILD_CUDA_PROVIDER=ON
63
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
64
+ -DUMF_BUILD_SHARED_LIBRARY=ON
65
+ ${{matrix.extra_build_options}}
66
+
67
+ - name : Configure CMake (simple)
68
+ if : matrix.simple_cmake == 'ON'
69
+ run : >
70
+ cmake
71
+ -B ${{env.BUILD_DIR}}
72
+ -DCMAKE_BUILD_TYPE=Release
73
+ -DUMF_BUILD_SHARED_LIBRARY=ON
74
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
75
+ ${{matrix.extra_build_options}}
76
+
77
+ - name : Build
78
+ run : cmake --build ${{env.BUILD_DIR}} --config Release -j $(nproc)
79
+
80
+ - name : Run examples
81
+ working-directory : ${{env.BUILD_DIR}}
82
+ run : ctest --output-on-failure --test-dir examples -C Release
83
+
84
+ - name : Run tests
85
+ if : matrix.build_tests == 'ON'
86
+ working-directory : ${{env.BUILD_DIR}}
87
+ run : ctest --output-on-failure --test-dir test -C Release
88
+
89
+ windows-build :
90
+ name : Windows
91
+ runs-on : windows-latest
92
+
93
+ env :
94
+ 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"
95
+ strategy :
96
+ matrix :
97
+ include :
98
+ - build_tests : ' ON'
99
+ simple_cmake : ' OFF'
100
+ - build_tests : ' OFF'
101
+ simple_cmake : ' OFF'
102
+ - build_tests : ' OFF'
103
+ simple_cmake : ' ON'
52
104
53
105
steps :
54
106
- name : Checkout repository
@@ -57,24 +109,16 @@ jobs:
57
109
fetch-depth : 0
58
110
59
111
- name : Initialize vcpkg
60
- if : matrix.os == 'windows-latest'
61
112
uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
62
113
with :
63
114
vcpkgGitCommitId : ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
64
115
vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
65
116
vcpkgJsonGlob : ' **/vcpkg.json'
66
117
67
- - name : Install dependencies (windows-latest)
68
- if : matrix.os == 'windows-latest'
118
+ - name : Install dependencies
69
119
run : vcpkg install --triplet x64-windows
70
120
shell : pwsh # Specifies PowerShell as the shell for running the script.
71
121
72
- - name : Install dependencies
73
- if : matrix.os != 'windows-latest'
74
- run : |
75
- sudo apt-get update
76
- sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev
77
-
78
122
- name : Configure CMake
79
123
if : matrix.simple_cmake == 'OFF'
80
124
run : >
@@ -91,17 +135,16 @@ jobs:
91
135
-DUMF_BUILD_CUDA_PROVIDER=ON
92
136
-DUMF_TESTS_FAIL_ON_SKIP=ON
93
137
-DUMF_BUILD_SHARED_LIBRARY=ON
94
- ${{matrix.extra_build_options}}
95
138
96
139
- name : Configure CMake (simple)
97
140
if : matrix.simple_cmake == 'ON'
98
141
run : >
99
142
cmake
100
143
-B ${{env.BUILD_DIR}}
101
144
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
145
+ -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
102
146
-DUMF_BUILD_SHARED_LIBRARY=ON
103
147
-DUMF_TESTS_FAIL_ON_SKIP=ON
104
- ${{matrix.extra_build_options}}
105
148
106
149
- name : Build
107
150
run : cmake --build ${{env.BUILD_DIR}} --config Release -j
@@ -118,7 +161,6 @@ jobs:
118
161
# TODO: We could add some script to verify metadata of dll's (selected fields, perhaps)
119
162
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
120
163
- name : Print metadata of our dll's
121
- if : matrix.os == 'windows-latest'
122
164
run : |
123
165
get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list
124
166
get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list
0 commit comments