# Lists of paths for artifacts of various stages.

.cmake_build_artifacts:
    artifacts:
        expire_in: 1d
        # Because build logs are in here, we should always upload artifacts.
        when: always
        paths:
            # Install tree
            - build/install/

            # Logs of the build
            - compile_output.log

            # The artifacts of the build.
            - build/bin/
            - build/lib/
            - build/Utilities/KWIML/vtkkwiml/test/kwiml_test
            - build/Utilities/KWIML/vtkkwiml/test/kwiml_test.exe

            # Python packages go here
            - build/lib64/

            # Needed for installation.
            - build/CMakeCache.txt
            - build/build.ninja
            - build/rules.ninja
            - build/cmake_install.cmake
            - build/**/cmake_install.cmake

            # CTest files.
            - build/CTestCustom.cmake
            - build/CTestTestfile.cmake
            - build/**/CTestTestfile.cmake
            - build/**/*.h
            - build/**/*.hxx
            - build/ExternalData/
            - build/Testing/
            - build/Testing/Temporary/
            - build/ThirdParty/freetype/vtkfreetype/include/

            # CDash files.
            - build/DartConfiguration.tcl

            # Virtual environment
            - build/ci-venv/

            # proj.db
            - build/share/vtk-*/proj/proj.db

            # CMake logs
            - build/CMakeFiles/CMakeError.log
            - build/CMakeFiles/CMakeOutput.log
            - build/CMakeFiles/rules.ninja

.cmake_junit_artifacts:
    artifacts:
        expire_in: 1d
        # Tests failing should still upload the artifact for further testing.
        when: always
        reports:
            junit:
                - build/junit.xml
        paths:
            - compile_output.log

.cmake_test_artifacts:
    artifacts:
        expire_in: 1d
        # Tests failing should still upload the artifact for further testing.
        when: always
        reports:
            junit:
                - build/junit.xml
        paths:
            # Install tree (if any)
            - build/install/

            # Virtual environment
            - build/ci-venv/

            # Debugging logs
            - build/Testing/Temporary/Last*.log

.cmake_tidy_artifacts:
    artifacts:
        expire_in: 1d
        when: always
        paths:
            - compile_output.log

.cmake_doxygen_artifacts:
    artifacts:
        expire_in: 1d
        when: always
        paths:
            - compile_output.log
            - doxygen_output.log

            - build/install/

.cmake_wheel_artifacts:
    artifacts:
        expire_in: 1d
        when: always
        paths:
            - compile_output.log
            - wheel_output.log

            - build/dist/*.whl
            - build/vtk-wheel-sdk-*.tar.xz

.cmake_release_artifacts:
    artifacts:
        expire_in: 1d
        when: always
        paths:
            - release/
