diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f807b91d..4f44018b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -37,7 +37,7 @@ jobs: upload-conda: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -46,7 +46,7 @@ jobs: docs-build: if: github.ref_type == 'branch' secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12 with: arch: "amd64" branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8105141c..b31f179d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -17,26 +17,26 @@ jobs: - conda-cpp-tests - docs-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-23.12 checks: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-23.12 conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 with: build_type: pull-request conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 with: build_type: pull-request docs-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12 with: build_type: pull-request node_type: "cpu4" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6c02a92f..553b4d8f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: cpp-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index a2748cf2..c251890c 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -39,6 +39,6 @@ sed_runner 's/'"release =.*"'/'"release = \"${NEXT_FULL_TAG}\""'/g' docs/conf.py sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' docs/basics.rst for FILE in .github/workflows/*.yaml; do - sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" + sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh diff --git a/rapids-cmake/cpm/gtest.cmake b/rapids-cmake/cpm/gtest.cmake index eb4822de..9aef2801 100644 --- a/rapids-cmake/cpm/gtest.cmake +++ b/rapids-cmake/cpm/gtest.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ function(rapids_cpm_gtest) GIT_SHALLOW ${shallow} PATCH_COMMAND ${patch_command} EXCLUDE_FROM_ALL ${exclude} - OPTIONS "INSTALL_GTEST ${to_install}") + OPTIONS "INSTALL_GTEST ${to_install}" "CMAKE_POSITION_INDEPENDENT_CODE ON") include("${rapids-cmake-dir}/cpm/detail/display_patch_status.cmake") rapids_cpm_display_patch_status(GTest) diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 6b875080..681de7b8 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -9,7 +9,7 @@ "version" : "0.0.1", "git_shallow" : false, "git_url" : "https://github.com/NVIDIA/cuCollections.git", - "git_tag" : "5186b39522e13a3681c0eb591db4eaacbf969485" + "git_tag" : "7c76a124df0c2cd3fd66e3e080b9470a3b4707c6" }, "fmt" : { "version" : "9.1.0", diff --git a/testing/cpm/CMakeLists.txt b/testing/cpm/CMakeLists.txt index fd5112f8..505e76c4 100644 --- a/testing/cpm/CMakeLists.txt +++ b/testing/cpm/CMakeLists.txt @@ -56,6 +56,7 @@ add_cmake_config_test( cpm_gbench-simple.cmake ) add_cmake_config_test( cpm_gtest-export.cmake ) add_cmake_config_test( cpm_gtest-simple.cmake ) +add_cmake_config_test( cpm_gtest-static.cmake ) add_cmake_config_test( cpm_libcudacxx-after_cpmfind.cmake SERIAL) add_cmake_config_test( cpm_libcudacxx-export.cmake ) diff --git a/testing/cpm/cpm_gtest-static.cmake b/testing/cpm/cpm_gtest-static.cmake new file mode 100644 index 00000000..4de53b09 --- /dev/null +++ b/testing/cpm/cpm_gtest-static.cmake @@ -0,0 +1,42 @@ +#============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= +include(${rapids-cmake-dir}/cpm/init.cmake) +include(${rapids-cmake-dir}/cpm/gtest.cmake) + +rapids_cpm_init() + +if(TARGET GTest::gtest) + message(FATAL_ERROR "Expected GTest::gtest not to exist") +endif() + +set(BUILD_SHARED_LIBS OFF) +rapids_cpm_gtest() + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/use_gtest.cpp" [=[ +#include + +// The fixture for testing class Foo. +class FooTest : public testing::Test { + + FooTest() {} + ~FooTest() override { } + + void SetUp() override {} + void TearDown() override {} +}; +]=]) +add_library(uses_gtest SHARED ${CMAKE_CURRENT_BINARY_DIR}/use_gtest.cpp) +target_link_libraries(uses_gtest PRIVATE GTest::gtest)