Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
$opts += " -DEMBREE_MAX_ISA=AVX512"
$opts += " -DEMBREE_INSTALL_DEPENDENCIES=ON"
$opts += " -DEMBREE_TESTING_INSTALL_TESTS=ON"
$opts += " -DCMAKE_INSTALL_BINDIR=bin"
$opts += " -DCMAKE_INSTALL_DOCDIR=doc"
$opts += " -DCMAKE_INSTALL_INCLUDEDIR=include"
$opts += " -DCMAKE_INSTALL_LIBDIR=lib"
$opts += " -DCMAKE_INSTALL_TESTDIR=testing"
$opts += " -DEMBREE_ZIP_MODE=ON"

Expand Down Expand Up @@ -71,6 +75,7 @@ jobs:
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_LIBDIR=lib"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DCMAKE_MACOSX_RPATH=ON"
opts+=" -DCMAKE_SKIP_INSTALL_RPATH=OFF"
Expand Down Expand Up @@ -122,6 +127,7 @@ jobs:
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_LIBDIR=lib"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DCMAKE_MACOSX_RPATH=ON"
opts+=" -DCMAKE_SKIP_INSTALL_RPATH=OFF"
Expand Down Expand Up @@ -179,6 +185,10 @@ jobs:
opts+=" -DEMBREE_MAX_ISA=AVX512"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_LIBDIR=lib"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DEMBREE_ZIP_MODE=ON"

Expand Down Expand Up @@ -226,6 +236,10 @@ jobs:
$opts += " -DEMBREE_MAX_ISA=AVX512"
$opts += " -DEMBREE_INSTALL_DEPENDENCIES=ON"
$opts += " -DEMBREE_TESTING_INSTALL_TESTS=ON"
$opts += " -DCMAKE_INSTALL_BINDIR=bin"
$opts += " -DCMAKE_INSTALL_DOCDIR=doc"
$opts += " -DCMAKE_INSTALL_INCLUDEDIR=include"
$opts += " -DCMAKE_INSTALL_LIBDIR=lib"
$opts += " -DCMAKE_INSTALL_TESTDIR=testing"
$opts += " -DEMBREE_ZIP_MODE=ON"

Expand Down Expand Up @@ -258,6 +272,10 @@ jobs:
opts+=" -DEMBREE_MAX_ISA=AVX512"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_LIBDIR=lib"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DEMBREE_ZIP_MODE=ON"

Expand Down
26 changes: 18 additions & 8 deletions common/cmake/package.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright 2009-2021 Intel Corporation
## Copyright 2009 Intel Corporation
Comment thread
johguenther marked this conversation as resolved.
## SPDX-License-Identifier: Apache-2.0

INCLUDE(GNUInstallDirs)
Expand Down Expand Up @@ -236,6 +236,8 @@ IF (EMBREE_SYCL_SUPPORT)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.sycl")
SET(EMBREE_VERSION_SUFFIX)
ENDIF()
# the testing package is platform independent, thus no platform suffix
SET(PACKAGE_TESTING_NAME "${CPACK_PACKAGE_FILE_NAME}-testing")
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png")
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
IF(NOT WIN32)
Expand All @@ -252,6 +254,7 @@ SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)

SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
SET(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
SET(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ON)

SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")
Expand Down Expand Up @@ -323,16 +326,23 @@ ELSE()
ENDIF()
ENDIF()

# name the group archives directly, the group name is only upper cased
SET(CPACK_ARCHIVE_EMBREE_FILE_NAME "${PACKAGE_BASE_NAME}")
SET(CPACK_ARCHIVE_EMBREE-TESTING_FILE_NAME "${PACKAGE_TESTING_NAME}")


add_custom_target(
build ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target package -j8
COMMAND ${CMAKE_COMMAND} -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_build.cmake
# repackage the tests without top-level directory, to be usable with the package of any platform
COMMAND ${CMAKE_CPACK_COMMAND} --config ${PROJECT_BINARY_DIR}/CPackConfig.cmake -B ${PROJECT_BINARY_DIR} -C ${CMAKE_BUILD_TYPE} -D CPACK_COMPONENTS_ALL=testing -D CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY=OFF
# files installed without component are not part of any package
COMMAND ${CMAKE_COMMAND} -E rm -f ${PACKAGE_BASE_NAME}-Unspecified.${PACKAGE_EXT}
)

add_custom_target(
test_package ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd embree_install/testing && ${CMAKE_COMMAND} -B build -DEMBREE_TESTING_INTENSITY=${EMBREE_TESTING_INTENSITY}
COMMAND ctest --test-dir ${CMAKE_CURRENT_BINARY_DIR}/embree_install/testing/build -VV -C ${CMAKE_BUILD_TYPE} --output-log ctest.output
test_package ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_TESTING_NAME=${PACKAGE_TESTING_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd embree_install/${PACKAGE_BASE_NAME}/testing && ${CMAKE_COMMAND} -B build -DEMBREE_TESTING_INTENSITY=${EMBREE_TESTING_INTENSITY}
COMMAND ctest --test-dir ${CMAKE_CURRENT_BINARY_DIR}/embree_install/${PACKAGE_BASE_NAME}/testing/build -VV -C ${CMAKE_BUILD_TYPE} --output-log ctest.output
COMMAND ${CMAKE_COMMAND} -DWHAT="CHECK" -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
)

Expand All @@ -344,8 +354,8 @@ else()
endif()

add_custom_target(
test_integration ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} -B build --preset ${EMBREE_TESTING_INTEGRATION_PRESET} -Dembree_DIR="${CMAKE_CURRENT_BINARY_DIR}/embree_install/lib/cmake/embree-${EMBREE_VERSION}"
test_integration ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_TESTING_NAME=${PACKAGE_TESTING_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} -B build --preset ${EMBREE_TESTING_INTEGRATION_PRESET} -Dembree_DIR="${CMAKE_CURRENT_BINARY_DIR}/embree_install/${PACKAGE_BASE_NAME}/${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}"
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} --build build --config Release
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${INTEGRATE_BINARY}
)
)
14 changes: 8 additions & 6 deletions doc/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@ help of the device option in ocloc tool:
Building Embree Tests
---------------------

Embree is released with a bundle of tests in an optional testing package.
To run these tests extract the testing package in the same folder as your embree installation.
e.g.:

tar -xzf embree-<EMBREE_VERSION>-testing.zip -C /path/to/installed/embree
Embree is released with a bundle of tests in an optional testing package:
[embree-<EMBREE_VERSION>-testing.tar.gz](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>-testing.tar.gz).
The testing package works with the Embree package of any platform. Extract it
into the folder of your Embree installation, e.g.:

The tests are extracted into a new folder inside you embree installation and can be run with:
tar -xzf embree-<EMBREE_VERSION>-testing.tar.gz -C /path/to/installed/embree

The tests are extracted into the `testing` folder inside the Embree installation
and can be run with:

cd /path/to/installed/embree/testing
cmake -B build
Expand Down
15 changes: 0 additions & 15 deletions scripts/package_build.cmake

This file was deleted.

3 changes: 2 additions & 1 deletion scripts/package_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ if(${WHAT} STREQUAL "UNPACK")
message("PACKAGE_BASENAME = ${PACKAGE_BASENAME}")
message("PACKAGE_EXT = ${PACKAGE_EXT}")
file(ARCHIVE_EXTRACT INPUT "${PACKAGE_BASENAME}.${PACKAGE_EXT}" DESTINATION "embree_install")
file(ARCHIVE_EXTRACT INPUT "${PACKAGE_BASENAME}-testing.${PACKAGE_EXT}" DESTINATION "embree_install")
# the testing package has no top-level directory, extract it into the Embree package directory
file(ARCHIVE_EXTRACT INPUT "${PACKAGE_TESTING_NAME}.${PACKAGE_EXT}" DESTINATION "embree_install/${PACKAGE_BASENAME}")
elseif(${WHAT} STREQUAL "CHECK")
file(READ ctest.output output_content)
string(FIND "${output_content}" "100% tests passed, 0 tests failed" pos)
Expand Down
9 changes: 7 additions & 2 deletions scripts/prepare-test-files-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ else
echo "Extracted: $archive" >&2
fi
done
echo "EMBREE_DIR=$DEST_DIR" >> "$GITHUB_ENV"
echo "$DEST_DIR" # Output for immediate use

# archives have a top level directory named after the package, except the testing package
EMBREE_DIR=$(echo "$DEST_DIR"/embree-*)
rm -rf "$EMBREE_DIR/testing"
mv "$DEST_DIR/testing" "$EMBREE_DIR"
echo "EMBREE_DIR=$EMBREE_DIR" >> "$GITHUB_ENV"
echo "$EMBREE_DIR" # Output for immediate use
fi

echo "Test files prepared successfully (macOS)" >&2
9 changes: 7 additions & 2 deletions scripts/prepare-test-files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ if ($TestType -eq "integration") {
Expand-Archive -Path $_.FullName -DestinationPath $DestDir -Force
Write-Host "Extracted: $($_.Name)"
}
Write-Host "EMBREE_DIR=$DestDir" | Out-File -FilePath $env:GITHUB_ENV -Append
Write-Output $DestDir # Output for immediate use

# archives have a top level directory named after the package, except the testing package
$EmbreeDir = (Get-ChildItem -Path $DestDir -Directory -Filter "embree-*" | Select-Object -First 1).FullName
Remove-Item -Recurse -Force "$EmbreeDir/testing" -ErrorAction SilentlyContinue
Move-Item "$DestDir/testing" $EmbreeDir
"EMBREE_DIR=$EmbreeDir" | Out-File -FilePath $env:GITHUB_ENV -Append
Write-Output $EmbreeDir # Output for immediate use
}

Write-Host "Test files prepared successfully"
9 changes: 7 additions & 2 deletions scripts/prepare-test-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ else
echo "Extracted: $archive" >&2
fi
done
echo "EMBREE_DIR=$DEST_DIR" >> "$GITHUB_ENV"
echo "$DEST_DIR" # Output for immediate use

# archives have a top level directory named after the package, except the testing package
EMBREE_DIR=$(echo "$DEST_DIR"/embree-*)
rm -rf "$EMBREE_DIR/testing"
mv "$DEST_DIR/testing" "$EMBREE_DIR"
echo "EMBREE_DIR=$EMBREE_DIR" >> "$GITHUB_ENV"
echo "$EMBREE_DIR" # Output for immediate use
fi

echo "Test files prepared successfully" >&2
4 changes: 2 additions & 2 deletions superbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Global settings ##

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10)

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
Expand Down Expand Up @@ -184,4 +184,4 @@ if (NOT BUILD_DEPENDENCIES_ONLY)
$<$<BOOL:${BUILD_ISPC}>:ispc>
$<$<BOOL:${BUILD_TBB}>:tbb>
)
endif()
endif()
Loading