@@ -270,3 +270,111 @@ jobs:
270270 with :
271271 path : ${{ env.CCACHE_DIR }}
272272 key : ccache-fedora-debug-default-gcc
273+
274+ asan-ubsan-adapters :
275+ name : Linux debug with adapters - testing asan and ubsan
276+ # prevent errors when forks ff their main branch
277+ if : ${{ github.repository == 'facebookincubator/velox' }}
278+ runs-on : ubuntu-latest
279+ container :
280+ image : ghcr.io/facebookincubator/velox-dev:adapters
281+ volumes :
282+ - /usr:/host_usr
283+ - /opt:/host_opt
284+ defaults :
285+ run :
286+ shell : bash
287+ env :
288+ CCACHE_DIR : ${{ github.workspace }}/ccache
289+ VELOX_DEPENDENCY_SOURCE : SYSTEM
290+ faiss_SOURCE : BUNDLED
291+ concurrency :
292+ group : ${{ github.workflow }}-asan-ubsan-adapters-${{ github.event.pull_request.number }}
293+ cancel-in-progress : true
294+ steps :
295+ - name : Free Disk Space
296+ run : |
297+ # Re-used from free-disk-space github action.
298+ getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
299+ # Show before
300+ echo "Original available disk space: " $(getAvailableSpace)
301+ # Remove DotNet.
302+ rm -rf /host_usr/share/dotnet || true
303+ # Remove android
304+ rm -rf /host_usr/local/lib/android || true
305+ # Remove CodeQL
306+ rm -rf /host_opt/hostedtoolcache/CodeQL || true
307+ # Show after
308+ echo "New available disk space: " $(getAvailableSpace)
309+
310+ - uses : actions/checkout@v5
311+ with :
312+ fetch-depth : 2
313+ persist-credentials : false
314+
315+ - name : Fix git permissions
316+ # Usually actions/checkout does this but as we run in a container
317+ # it doesn't work
318+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
319+
320+ - uses : apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4
321+ with :
322+ path : ${{ env.CCACHE_DIR }}
323+ key : ccache-asan-ubsan-adapters
324+
325+ - name : Zero Ccache Statistics
326+ run : |
327+ ccache -sz
328+
329+ - name : Make Debug Build
330+ env :
331+ MAKEFLAGS : NUM_THREADS=4 MAX_HIGH_MEM_JOBS=3 MAX_LINK_JOBS=3
332+ CUDA_VERSION : ' 12.8'
333+ CUDA_ARCHITECTURES : 70
334+ CUDA_COMPILER : /usr/local/cuda-${CUDA_VERSION}/bin/nvcc
335+ # Set compiler to GCC 12 for CUDA
336+ CUDA_FLAGS : -ccbin /opt/rh/gcc-toolset-12/root/usr/bin
337+ run : |
338+ EXTRA_CMAKE_FLAGS=(
339+ "-DVELOX_ENABLE_ASAN_UBSAN_SANITIZERS=ON"
340+ "-DVELOX_ENABLE_BENCHMARKS=ON"
341+ "-DVELOX_ENABLE_EXAMPLES=ON"
342+ "-DVELOX_ENABLE_ARROW=ON"
343+ "-DVELOX_ENABLE_GEO=ON"
344+ "-DVELOX_ENABLE_PARQUET=ON"
345+ "-DVELOX_ENABLE_HDFS=ON"
346+ "-DVELOX_ENABLE_S3=ON"
347+ "-DVELOX_ENABLE_GCS=ON"
348+ "-DVELOX_ENABLE_ABFS=ON"
349+ "-DVELOX_ENABLE_WAVE=ON"
350+ "-DVELOX_MONO_LIBRARY=ON"
351+ "-DVELOX_BUILD_SHARED=ON"
352+ "-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON"
353+ )
354+ clang++ --version
355+ dnf install -y compiler-rt
356+ CC=clang CXX=clang++ make debug EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS[*]}"
357+
358+ - name : Ccache after
359+ run : ccache -s
360+
361+ - uses : apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4
362+ with :
363+ path : ${{ env.CCACHE_DIR }}
364+ key : ccache-asan-ubsan-adapters
365+
366+ - name : Run Tests
367+ env :
368+ LIBHDFS3_CONF : ${{ github.workspace }}/scripts/ci/hdfs-client.xml
369+ working-directory : _build/debug
370+ run : |
371+ # Can be removed after images are rebuild
372+ if [ -f "/opt/miniforge/etc/profile.d/conda.sh" ]; then
373+ source "/opt/miniforge/etc/profile.d/conda.sh"
374+ conda activate adapters
375+ fi
376+ # Needed for HADOOP 3.3.6 minicluster. Can remove after updating to 3.4.2.
377+ wget https://repo1.maven.org/maven2/org/mockito/mockito-core/2.23.4/mockito-core-2.23.4.jar -O /usr/local/hadoop/share/hadoop/mapreduce/mockito-core-2.23.4.jar
378+
379+ export CLASSPATH=`/usr/local/hadoop/bin/hdfs classpath --glob`
380+ ctest -j 4 --label-exclude cuda_driver --output-on-failure --no-tests=error
0 commit comments