name: "Sanitizer CI" description: "Sanitizer CI" inputs: sanitizer_type: description: "Type of sanitizer" required: true lfs_sha: description: "Cache LFS sha" required: true alembic_version: description: "Version of alembic to build" required: false assimp_version: description: "Version of assimp to build" required: false blosc_version: description: "Version of blosc to build" required: true curl_version: description: "Version of curl to build" required: false draco_version: description: "Version of draco to build" required: false gdal_version: description: "Version of gdal to build" required: false geotiff_version: description: "Version of geotiff to build" required: false imath_version: description: "Version of imath to build" required: false occt_version: description: "Version of occt to build" required: false openexr_version: description: "Version of openexr to build" required: false pdal_version: description: "Version of pdal to build" required: false proj_version: description: "Version of proj to build" required: false sqlite_csb_version: description: "Version of csb providing sqlite to build against" required: false tbb_version: description: "Version of tbb to build" required: true tiff_version: description: "Version of tiff to build" required: false vtk_version: description: "VTK version" required: true webp_version: description: "webP version" required: true webifc_version: description: "Version of webifc to build" required: true zlib_version: description: "Version of zlib to build" required: true global_cache_index: description: "Global cache index" required: true runs: using: "composite" steps: - name: Check required inputs shell: bash run: | [[ "${{ inputs.sanitizer_type }}" ]] || { echo "sanitizer_type input is empty" ; exit 1; } [[ "${{ inputs.lfs_sha }}" ]] || { echo "lfs_sha input is empty" ; exit 1; } [[ "${{ inputs.vtk_version }}" ]] || { echo "vtk_version input is empty" ; exit 1; } - name: Recover LFS Data uses: f3d-app/lfs-data-cache-action@v2 with: type: "consumer" lfs_sha: ${{inputs.lfs_sha}} cache_postfix: cache-0 - name: Install all F3D dependencies uses: ./source/.github/actions/generic-dependencies with: alembic_version: ${{inputs.alembic_version}} assimp_version: ${{inputs.assimp_version}} blosc_version: ${{inputs.blosc_version}} curl_version: ${{inputs.curl_version}} draco_version: ${{inputs.draco_version}} gdal_version: ${{inputs.gdal_version}} geotiff_version: ${{inputs.geotiff_version}} imath_version: ${{inputs.imath_version}} occt_version: ${{inputs.occt_version}} openexr_version: ${{inputs.openexr_version}} pdal_version: ${{inputs.pdal_version}} proj_version: ${{inputs.proj_version}} sqlite_csb_version: ${{inputs.sqlite_csb_version}} tbb_version: ${{inputs.tbb_version}} tiff_version: ${{inputs.tiff_version}} webifc_version: ${{inputs.webifc_version}} webp_version: ${{inputs.webp_version}} zlib_version: ${{inputs.zlib_version}} global_cache_index: ${{inputs.global_cache_index}} - name: Install VTK dependency uses: ./source/.github/actions/vtk-install-dep with: blosc_version: ${{inputs.blosc_version}} curl_version: ${{inputs.curl_version}} gdal_version: ${{inputs.gdal_version}} geotiff_version: ${{inputs.geotiff_version}} pdal_version: ${{inputs.pdal_version}} proj_version: ${{inputs.proj_version}} sqlite_csb_version: ${{inputs.sqlite_csb_version}} tbb_version: ${{inputs.tbb_version}} tiff_version: ${{inputs.tiff_version}} vtk_version: ${{inputs.vtk_version}} zlib_version: ${{inputs.zlib_version}} global_cache_index: ${{inputs.global_cache_index}} - name: Setup Build Directory shell: bash working-directory: ${{github.workspace}} run: mkdir build # USD and VDB gives a lot of leaks and race conditions # Not sure if it's false positives but the plugin is disabled for now - name: Configure shell: bash working-directory: ${{github.workspace}}/build run: > cmake ../source -Werror=dev -Werror=deprecated --warn-uninitialized -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_PREFIX_PATH:PATH=$(pwd)/../dependencies/install/ -DF3D_BINDINGS_C=${{ inputs.sanitizer_type == 'undefined' && 'OFF' || 'ON' }} -DF3D_MODULE_EXR=ON -DF3D_MODULE_UI=ON -DF3D_MODULE_WEBP=ON -DF3D_PLUGIN_BUILD_ALEMBIC=ON -DF3D_PLUGIN_BUILD_ASSIMP=ON -DF3D_PLUGIN_BUILD_DRACO=ON -DF3D_PLUGIN_BUILD_OCCT=ON -DF3D_PLUGIN_BUILD_PDAL=ON -DF3D_PLUGIN_BUILD_USD=OFF -DF3D_PLUGIN_BUILD_VDB=OFF -DF3D_SANITIZER=${{inputs.sanitizer_type}} -DF3D_STRICT_BUILD=ON -DF3D_TESTING_ENABLE_EGL_TESTS=ON -DF3D_TESTING_ENABLE_EXTERNAL_GLFW=ON -DF3D_TESTING_ENABLE_EXTERNAL_QT=ON -DF3D_TESTING_ENABLE_GLX_TESTS=ON -DF3D_TESTING_ENABLE_LONG_TIMEOUT_TESTS=ON -DF3D_TESTING_ENABLE_OSMESA_TESTS=ON - name: Build shell: bash working-directory: ${{github.workspace}}/build run: cmake --build . --parallel 2 - name: Run Xvfb shell: bash run: Xvfb $DISPLAY -screen 0 1280x1024x24 & # Certain interaction test are failing because sanitizer is slow in CI - name: Set CI test exception shell: bash run: echo "F3D_CTEST_EXCEPTIONS=(TestInteractionAnimationSlow)" >> $GITHUB_ENV - name: Test shell: bash working-directory: ${{github.workspace}}/build run: | export LSAN_OPTIONS=suppressions=$(pwd)/../source/.lsan.supp:use_tls=0 export TSAN_OPTIONS=suppressions=$(pwd)/../source/.tsan.supp ctest -E "${{ env.F3D_CTEST_EXCEPTIONS }}" -C Release -j 2 --output-on-failure || ctest -E "${{ env.F3D_CTEST_EXCEPTIONS }}" -C Release -j 1 --rerun-failed -VV - name: Upload Tests Artifact if: failure() uses: actions/upload-artifact@v7 with: path: ./build/Testing/Temporary name: f3d-tests-artifact-sanitizer-${{matrix.sanitizer_type}}