Skip to content

Commit 1dc7cca

Browse files
committed
dockerHub test L&Win
1 parent 233a67d commit 1dc7cca

File tree

1 file changed

+83
-39
lines changed

1 file changed

+83
-39
lines changed

.github/workflows/reusable_fast.yml

Lines changed: 83 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Fast builds
21
name: FastBuild
32

43
on: workflow_call
@@ -11,75 +10,45 @@ env:
1110
INSTL_DIR : "${{github.workspace}}/../install-dir"
1211

1312
jobs:
14-
FastBuild:
15-
name: Fast builds
16-
container:
13+
FastBuild_Linux:
14+
name: Fast builds (Linux)
15+
runs-on: ubuntu-latest
16+
container:
1717
image: rbanka974/umf-ubuntu-20.04:latest
18-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04'
18+
1919
env:
2020
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"
2121
strategy:
2222
matrix:
2323
include:
24-
- os: windows-latest
25-
disjoint: 'OFF'
26-
build_tests: 'ON'
27-
simple_cmake: 'OFF'
28-
# pure C build (Windows)
29-
- os: windows-latest
30-
disjoint: 'OFF'
31-
# Tests' building is off for a pure C build
32-
build_tests: 'OFF'
33-
simple_cmake: 'OFF'
3424
- os: ubuntu-latest
3525
disjoint: 'ON'
3626
build_tests: 'ON'
37-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
3827
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
3928
simple_cmake: 'OFF'
40-
# pure C build (Linux)
4129
- os: ubuntu-latest
4230
disjoint: 'OFF'
43-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
44-
# Tests' building is off for a pure C build
4531
build_tests: 'OFF'
4632
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
4733
simple_cmake: 'OFF'
48-
# simplest CMake on ubuntu-latest
4934
- os: ubuntu-latest
5035
disjoint: 'OFF'
5136
build_tests: 'ON'
5237
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
5338
simple_cmake: 'ON'
54-
# simplest CMake ubuntu-20.04
5539
- os: ubuntu-20.04
5640
disjoint: 'OFF'
5741
build_tests: 'ON'
5842
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
5943
simple_cmake: 'ON'
60-
runs-on: ${{ (matrix.os == 'ubuntu-latest' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }}
6144

6245
steps:
6346
- name: Checkout repository
6447
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6548
with:
6649
fetch-depth: 0
6750

68-
- name: Initialize vcpkg
69-
if: matrix.os == 'windows-latest'
70-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
71-
with:
72-
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
73-
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
74-
vcpkgJsonGlob: '**/vcpkg.json'
75-
76-
- name: Install dependencies (windows-latest)
77-
if: matrix.os == 'windows-latest'
78-
run: vcpkg install
79-
shell: pwsh # Specifies PowerShell as the shell for running the script.
80-
8151
- name: Install dependencies (ubuntu-latest)
82-
if: matrix.os == 'ubuntu-latest'
8352
run: |
8453
sudo apt-get update
8554
sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev
@@ -92,7 +61,6 @@ jobs:
9261
.github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package
9362
9463
- name: Set ptrace value for IPC test (on Linux only)
95-
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }}
9664
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
9765

9866
- name: Configure CMake
@@ -136,8 +104,84 @@ jobs:
136104
working-directory: ${{env.BUILD_DIR}}
137105
run: ctest --output-on-failure --test-dir test -C Release
138106

139-
# TODO: We could add some script to verify metadata of dll's (selected fields, perhaps)
140-
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
107+
FastBuild_Windows:
108+
name: Fast builds (Windows)
109+
runs-on: windows-latest
110+
111+
env:
112+
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"
113+
strategy:
114+
matrix:
115+
include:
116+
- os: windows-latest
117+
disjoint: 'OFF'
118+
build_tests: 'ON'
119+
simple_cmake: 'OFF'
120+
- os: windows-latest
121+
disjoint: 'OFF'
122+
build_tests: 'OFF'
123+
simple_cmake: 'OFF'
124+
125+
steps:
126+
- name: Checkout repository
127+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
128+
with:
129+
fetch-depth: 0
130+
131+
- name: Initialize vcpkg
132+
if: matrix.os == 'windows-latest'
133+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
134+
with:
135+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
136+
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
137+
vcpkgJsonGlob: '**/vcpkg.json'
138+
139+
- name: Install dependencies (windows-latest)
140+
if: matrix.os == 'windows-latest'
141+
run: vcpkg install
142+
shell: pwsh
143+
144+
- name: Configure CMake
145+
if: matrix.simple_cmake == 'OFF'
146+
run: >
147+
cmake
148+
-B ${{env.BUILD_DIR}}
149+
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
150+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
151+
-DUMF_FORMAT_CODE_STYLE=OFF
152+
-DUMF_DEVELOPER_MODE=ON
153+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
154+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
155+
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
156+
-DUMF_BUILD_EXAMPLES=ON
157+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
158+
-DUMF_BUILD_CUDA_PROVIDER=ON
159+
-DUMF_TESTS_FAIL_ON_SKIP=ON
160+
-DUMF_BUILD_SHARED_LIBRARY=ON
161+
${{matrix.extra_build_options}}
162+
163+
- name: Configure CMake (simple)
164+
if: matrix.simple_cmake == 'ON'
165+
run: >
166+
cmake
167+
-B ${{env.BUILD_DIR}}
168+
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
169+
-DUMF_BUILD_SHARED_LIBRARY=ON
170+
-DUMF_TESTS_FAIL_ON_SKIP=ON
171+
${{matrix.extra_build_options}}
172+
173+
- name: Build
174+
run: cmake --build ${{env.BUILD_DIR}} --config Release -j
175+
176+
- name: Run examples
177+
working-directory: ${{env.BUILD_DIR}}
178+
run: ctest --output-on-failure --test-dir examples -C Release
179+
180+
- name: Run tests
181+
if: matrix.build_tests == 'ON'
182+
working-directory: ${{env.BUILD_DIR}}
183+
run: ctest --output-on-failure --test-dir test -C Release
184+
141185
- name: Print metadata of our dll's
142186
if: matrix.os == 'windows-latest'
143187
run: |

0 commit comments

Comments
 (0)