-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
119 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
name: Build - Fuzztests on L0 HW - Reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
test_label: | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fuzztest-build-hw: | ||
name: Build and run fuzz tests on L0 HW | ||
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW | ||
strategy: | ||
matrix: | ||
build_type: [Debug, Release] | ||
compiler: [{c: clang, cxx: clang++}] | ||
|
||
runs-on: 'FUZZTESTS' | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Install pip packages | ||
run: pip install -r third_party/requirements.txt | ||
|
||
- name: Download DPC++ | ||
run: | | ||
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz | ||
mkdir dpcpp_compiler | ||
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler | ||
- name: Build level zero with gcc | ||
run: | | ||
git clone -b v1.16.1 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero | ||
cd ${{github.workspace}}/level-zero | ||
cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ | ||
cmake --build build -j $(nproc) | ||
- name: Configure CMake | ||
# In order to use sanitizers, vm.mmap_rnd_bits=28 must be set in the system, | ||
# otherwise random SEGV at the start of the test occurs. | ||
# Alternatively, clang 18.1.0 onwards with fixed sanitizers behavior can be used, | ||
# if available | ||
run: > | ||
cmake | ||
-B${{github.workspace}}/build | ||
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} | ||
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} | ||
-DUR_ENABLE_TRACING=ON | ||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} | ||
-DUR_BUILD_TESTS=ON | ||
-DUR_USE_ASAN=ON | ||
-DUR_USE_UBSAN=ON | ||
-DUR_BUILD_ADAPTER_L0=ON | ||
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so | ||
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/ | ||
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ | ||
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build -j $(nproc) | ||
|
||
- name: Fuzz test | ||
working-directory: ${{github.workspace}}/build | ||
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "${{inputs.test_label}}" --verbose | ||
|
||
- name: Get information about platform | ||
if: ${{ always() }} | ||
run: .github/scripts/get_system_info.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters