Skip to content

Commit a49dbdf

Browse files
committed
add regular tests under fuzz in nighlty CI
1 parent 072829e commit a49dbdf

File tree

1 file changed

+12
-306
lines changed

1 file changed

+12
-306
lines changed

.github/workflows/nightly.yml

Lines changed: 12 additions & 306 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Various non-standard tests, requiring e.g. longer run
22
name: Nightly
33

4-
# This job is run at 04:00 UTC every day or on demand.
54
on:
6-
workflow_dispatch:
7-
schedule:
8-
- cron: '0 4 * * *'
5+
push:
6+
branches-ignore:
7+
- 'dependabot/**'
8+
pull_request:
99

1010
permissions:
1111
contents: read
@@ -57,308 +57,14 @@ jobs:
5757
- name: Build
5858
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --verbose -j$(nproc)
5959

60-
- name: Fuzz long test
60+
- name: Run regular tests
6161
working-directory: ${{github.workspace}}/build
62-
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"
63-
64-
valgrind:
65-
name: Valgrind
66-
strategy:
67-
fail-fast: false
68-
matrix:
69-
tool: ['memcheck', 'drd', 'helgrind']
70-
runs-on: ubuntu-latest
71-
72-
steps:
73-
- name: Checkout repository
74-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75-
with:
76-
fetch-depth: 0
77-
78-
- name: Install apt packages
79-
run: |
80-
sudo apt-get update
81-
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind
82-
83-
- name: Configure CMake
84-
run: >
85-
cmake
86-
-B ${{github.workspace}}/build
87-
-DCMAKE_BUILD_TYPE=Debug
88-
-DUMF_FORMAT_CODE_STYLE=OFF
89-
-DUMF_DEVELOPER_MODE=ON
90-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
91-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
92-
-DUMF_BUILD_CUDA_PROVIDER=OFF
93-
-DUMF_USE_VALGRIND=1
94-
-DUMF_TESTS_FAIL_ON_SKIP=ON
95-
96-
- name: Build
97-
run: cmake --build ${{github.workspace}}/build --config Debug -j$(nproc)
98-
99-
- name: Run tests under valgrind
100-
run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
101-
102-
Windows-generators:
103-
name: Windows ${{matrix.generator}} generator
104-
strategy:
105-
matrix:
106-
build_type: [Debug, Release]
107-
compiler: [{c: cl, cxx: cl}]
108-
shared_library: ['ON', 'OFF']
109-
static_hwloc: ['ON', 'OFF']
110-
generator: ['Ninja', 'NMake Makefiles']
111-
umfd_lib: ['ON', 'OFF']
112-
113-
runs-on: windows-latest
114-
115-
steps:
116-
- name: Checkout
117-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
118-
with:
119-
fetch-depth: 0
120-
121-
- name: Set VCPKG_PATH with hwloc
122-
if: matrix.static_hwloc == 'OFF'
123-
run: echo "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" >> $env:GITHUB_ENV
124-
125-
- name: Set VCPKG_PATH without hwloc
126-
if: matrix.static_hwloc == 'ON'
127-
run: echo "VCPKG_PATH=${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" >> $env:GITHUB_ENV
128-
129-
- name: Initialize vcpkg
130-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
131-
env:
132-
VCPKG_PATH: ${{env.VCPKG_PATH}}
133-
with:
134-
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
135-
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
136-
vcpkgJsonGlob: '**/vcpkg.json'
137-
138-
- name: Install dependencies
139-
run: vcpkg install --triplet x64-windows
140-
141-
- name: Install Ninja
142-
if: matrix.generator == 'Ninja'
143-
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
144-
145-
- name: Configure MSVC environment
146-
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
62+
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
14763

148-
- name: Configure build
149-
run: >
150-
cmake
151-
-B ${{env.BUILD_DIR}}
152-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
153-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
154-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
155-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
156-
-G "${{matrix.generator}}"
157-
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
158-
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}}
159-
-DUMF_FORMAT_CODE_STYLE=OFF
160-
-DUMF_DEVELOPER_MODE=ON
161-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
162-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
163-
-DUMF_BUILD_CUDA_PROVIDER=ON
164-
-DUMF_TESTS_FAIL_ON_SKIP=ON
165-
${{ matrix.umfd_lib == 'ON' && '-DUMF_USE_DEBUG_POSTFIX=ON' || '' }}
64+
- name: Run regular tests with proxy library
65+
working-directory: ${{env.BUILD_DIR}}
66+
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
16667

167-
- name: Build UMF
168-
shell: cmd
169-
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
170-
171-
- name: Run tests
172-
shell: cmd
173-
working-directory: ${{env.BUILD_DIR}}
174-
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
175-
176-
- name: Get UMF version
177-
run: |
178-
$version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value
179-
echo "UMF_VERSION=$version" >> $env:GITHUB_ENV
180-
shell: pwsh
181-
182-
- name: Test UMF installation and uninstallation
183-
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
184-
# The '--umfd-lib' parameter is added when the UMF is built with the umfd library
185-
run: >
186-
python3 ${{github.workspace}}/test/test_installation.py
187-
--build-dir ${{env.BUILD_DIR}}
188-
--install-dir ${{env.INSTALL_DIR}}
189-
--build-type ${{matrix.build_type}}
190-
--umf-version ${{env.UMF_VERSION}}
191-
${{ matrix.shared_library == 'ON' && '--proxy --shared-library' || '' }}
192-
${{ matrix.umfd_lib == 'ON' && '--umfd-lib' || ''}}
193-
${{ matrix.static_hwloc == 'ON' && '--hwloc' || '' }}
194-
195-
icx:
196-
name: ICX
197-
env:
198-
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"
199-
strategy:
200-
matrix:
201-
os: ['windows-2019', 'windows-2022']
202-
build_type: [Debug]
203-
compiler: [{c: icx, cxx: icx}]
204-
shared_library: ['ON', 'OFF']
205-
include:
206-
- os: windows-2022
207-
build_type: Release
208-
compiler: {c: icx, cxx: icx}
209-
shared_library: 'ON'
210-
211-
runs-on: ${{matrix.os}}
212-
213-
steps:
214-
- name: Checkout
215-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
216-
with:
217-
fetch-depth: 0
218-
219-
- name: Initialize vcpkg
220-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
221-
with:
222-
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
223-
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
224-
vcpkgJsonGlob: '**/vcpkg.json'
225-
226-
- name: Install dependencies
227-
run: vcpkg install --triplet x64-windows
228-
229-
- name: Install Ninja
230-
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
231-
232-
- name: Download icx compiler
233-
env:
234-
# Link source: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html
235-
CMPLR_LINK: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/15a35578-2f9a-4f39-804b-3906e0a5f8fc/w_dpcpp-cpp-compiler_p_2024.2.1.83_offline.exe"
236-
run: |
237-
Invoke-WebRequest -Uri "${{ env.CMPLR_LINK }}" -OutFile compiler_install.exe
238-
239-
- name: Install icx compiler
240-
shell: cmd
241-
run: |
242-
start /b /wait .\compiler_install.exe -s -x -f extracted --log extract.log
243-
extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 ^
244-
-p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.
245-
246-
- name: Configure build
247-
shell: cmd
248-
run: |
249-
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
250-
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
251-
cmake ^
252-
-B ${{env.BUILD_DIR}} ^
253-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
254-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
255-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
256-
-G Ninja ^
257-
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
258-
-DUMF_FORMAT_CODE_STYLE=OFF ^
259-
-DUMF_DEVELOPER_MODE=ON ^
260-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON ^
261-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON ^
262-
-DUMF_BUILD_CUDA_PROVIDER=ON ^
263-
-DUMF_TESTS_FAIL_ON_SKIP=ON
264-
265-
- name: Build UMF
266-
shell: cmd
267-
run: |
268-
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
269-
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
270-
cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
271-
272-
- name: Run tests
273-
shell: cmd
274-
working-directory: ${{env.BUILD_DIR}}
275-
run: |
276-
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
277-
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
278-
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
279-
280-
# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
281-
# The hwloc library is fetched implicitly
282-
hwloc-fallback:
283-
name: "Fallback to static hwloc build"
284-
strategy:
285-
matrix:
286-
include:
287-
- os: 'ubuntu-latest'
288-
build_type: Release
289-
number_of_processors: '$(nproc)'
290-
- os: 'windows-latest'
291-
build_type: Release
292-
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
293-
294-
runs-on: ${{matrix.os}}
295-
296-
steps:
297-
- name: Install dependencies
298-
if: matrix.os == 'ubuntu-latest'
299-
run: sudo apt-get install -y libnuma-dev
300-
301-
- name: Checkout
302-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
303-
with:
304-
fetch-depth: 0
305-
306-
- name: Configure build
307-
run: >
308-
cmake
309-
-B ${{env.BUILD_DIR}}
310-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
311-
-DUMF_BUILD_SHARED_LIBRARY=ON
312-
-DUMF_BUILD_EXAMPLES=OFF
313-
-DUMF_DEVELOPER_MODE=ON
314-
-DUMF_LINK_HWLOC_STATICALLY=OFF
315-
-DUMF_TESTS_FAIL_ON_SKIP=ON
316-
317-
- name: Build UMF
318-
run: >
319-
cmake
320-
--build ${{env.BUILD_DIR}}
321-
--config ${{matrix.build_type}}
322-
-j ${{matrix.number_of_processors}}
323-
324-
- name: Run tests
325-
working-directory: ${{env.BUILD_DIR}}
326-
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
327-
328-
L0:
329-
uses: ./.github/workflows/reusable_gpu.yml
330-
with:
331-
provider: "LEVEL_ZERO"
332-
runner: "L0"
333-
L0-BMG:
334-
uses: ./.github/workflows/reusable_gpu.yml
335-
with:
336-
provider: "LEVEL_ZERO"
337-
runner: "L0-BMG"
338-
os: "['Ubuntu']"
339-
CUDA:
340-
uses: ./.github/workflows/reusable_gpu.yml
341-
with:
342-
provider: "CUDA"
343-
runner: "CUDA"
344-
345-
# Full execution of QEMU tests
346-
QEMU:
347-
uses: ./.github/workflows/reusable_qemu.yml
348-
with:
349-
short_run: false
350-
# Beside the 2 LTS Ubuntu, we also test this on the latest Ubuntu - to be updated
351-
# every 6 months, so we verify the latest version of packages (compilers, etc.).
352-
os: "['ubuntu-22.04', 'ubuntu-24.04', 'ubuntu-24.10']"
353-
354-
Benchmarks:
355-
uses: ./.github/workflows/reusable_benchmarks.yml
356-
permissions:
357-
contents: write
358-
pull-requests: write
359-
with:
360-
pr_no: '0'
361-
bench_script_params: '--save Baseline_PVC'
362-
363-
SYCL:
364-
uses: ./.github/workflows/reusable_sycl.yml
68+
- name: Fuzz long test
69+
working-directory: ${{github.workspace}}/build
70+
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"

0 commit comments

Comments
 (0)