diff options
author | Brad King <brad.king@kitware.com> | 2021-02-23 18:00:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-23 18:00:45 (GMT) |
commit | 6714074cd4754e8d9734174cf47ceb10180f934e (patch) | |
tree | 2534b320a355e353d5dad00ed8475973d28800af | |
parent | c2c31ae8969686f1909fe76fef43a232332c7b54 (diff) | |
parent | 397ced99d73aeec6271d56dd22ba8d2b715d1e7c (diff) | |
download | CMake-6714074cd4754e8d9734174cf47ceb10180f934e.zip CMake-6714074cd4754e8d9734174cf47ceb10180f934e.tar.gz CMake-6714074cd4754e8d9734174cf47ceb10180f934e.tar.bz2 |
Merge topic 'ci-macos-arm64' into release-3.20
397ced99d7 gitlab-ci: Add macos-arm64 jobs for Ninja and Xcode
0755c2ffbb gitlab-ci: rename macos build and test jobs to macos-x86_64
73150a3798 ci: add sccache 0.2.15 custom build for aarch64-apple-darwin
cab41b96ac ci: update to sccache 0.2.15 on linux builds
8dcbe5688a ci: Use Qt macOS 10.13+ package for macOS build and test jobs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5851
-rw-r--r-- | .gitlab-ci.yml | 83 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_arm64_ninja.cmake (renamed from .gitlab/ci/configure_macos_ninja.cmake) | 0 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_arm64_xcode.cmake (renamed from .gitlab/ci/configure_macos_xcode.cmake) | 0 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_x86_64_makefiles.cmake (renamed from .gitlab/ci/configure_macos_makefiles.cmake) | 0 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_x86_64_ninja.cmake | 3 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_x86_64_xcode.cmake | 2 | ||||
-rw-r--r-- | .gitlab/ci/download_qt.cmake | 82 | ||||
-rwxr-xr-x | .gitlab/ci/sccache.sh | 17 | ||||
-rw-r--r-- | .gitlab/os-macos.yml | 48 |
9 files changed, 146 insertions, 89 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a322aa6..d0b3b1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -236,62 +236,99 @@ build:linux-aarch64-package: # macOS builds -build:macos-ninja: +build:macos-x86_64-ninja: extends: - - .macos_ninja + - .macos_x86_64_ninja - .cmake_build_macos - .cmake_build_artifacts - - .macos_builder_tags + - .macos_x86_64_builder_tags - .run_manually -test:macos-ninja: +build:macos-arm64-ninja: extends: - - .macos_ninja + - .macos_arm64_ninja + - .cmake_build_macos + - .cmake_build_artifacts + - .macos_arm64_builder_tags + - .run_manually + variables: + CMAKE_CI_NO_MR: "true" + +test:macos-x86_64-ninja: + extends: + - .macos_x86_64_ninja + - .cmake_test_macos + - .cmake_test_artifacts + - .macos_x86_64_builder_tags + - .run_dependent + dependencies: + - build:macos-x86_64-ninja + needs: + - build:macos-x86_64-ninja + +test:macos-arm64-ninja: + extends: + - .macos_arm64_ninja - .cmake_test_macos - .cmake_test_artifacts - - .macos_builder_tags + - .macos_arm64_builder_tags - .run_dependent dependencies: - - build:macos-ninja + - build:macos-arm64-ninja needs: - - build:macos-ninja + - build:macos-arm64-ninja + variables: + CMAKE_CI_NO_MR: "true" -build:macos-makefiles: +build:macos-x86_64-makefiles: extends: - - .macos_makefiles + - .macos_x86_64_makefiles - .cmake_build_macos - .cmake_build_artifacts - - .macos_builder_tags + - .macos_x86_64_builder_tags - .run_manually -test:macos-makefiles: +test:macos-x86_64-makefiles: extends: - - .macos_makefiles + - .macos_x86_64_makefiles - .cmake_test_macos - - .macos_builder_tags + - .macos_x86_64_builder_tags + - .run_dependent + dependencies: + - build:macos-x86_64-makefiles + needs: + - build:macos-x86_64-makefiles + +test:macos-x86_64-xcode: + extends: + - .macos_x86_64_xcode + - .cmake_test_macos_external + - .macos_x86_64_builder_ext_tags - .run_dependent dependencies: - - build:macos-makefiles + - test:macos-x86_64-ninja needs: - - build:macos-makefiles + - test:macos-x86_64-ninja -test:macos-xcode: +test:macos-arm64-xcode: extends: - - .macos_xcode + - .macos_arm64_xcode - .cmake_test_macos_external - - .macos_builder_ext_tags + - .macos_arm64_builder_ext_tags - .run_dependent dependencies: - - test:macos-ninja + - test:macos-arm64-ninja needs: - - test:macos-ninja + - test:macos-arm64-ninja + variables: + CMAKE_CI_NO_MR: "true" build:macos-package: extends: - .macos_package - .cmake_build_macos_package - .cmake_release_artifacts - - .macos_builder_tags_package + - .macos_x86_64_builder_tags_package - .run_only_for_package dependencies: - prep:doc-package @@ -314,7 +351,7 @@ build:macos10.10-package: - .macos10.10_package - .cmake_build_macos_package - .cmake_release_artifacts - - .macos_builder_tags_package + - .macos_x86_64_builder_tags_package - .run_only_for_package dependencies: - prep:doc-package diff --git a/.gitlab/ci/configure_macos_ninja.cmake b/.gitlab/ci/configure_macos_arm64_ninja.cmake index f657d98..f657d98 100644 --- a/.gitlab/ci/configure_macos_ninja.cmake +++ b/.gitlab/ci/configure_macos_arm64_ninja.cmake diff --git a/.gitlab/ci/configure_macos_xcode.cmake b/.gitlab/ci/configure_macos_arm64_xcode.cmake index 1b976d2..1b976d2 100644 --- a/.gitlab/ci/configure_macos_xcode.cmake +++ b/.gitlab/ci/configure_macos_arm64_xcode.cmake diff --git a/.gitlab/ci/configure_macos_makefiles.cmake b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake index f657d98..f657d98 100644 --- a/.gitlab/ci/configure_macos_makefiles.cmake +++ b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake diff --git a/.gitlab/ci/configure_macos_x86_64_ninja.cmake b/.gitlab/ci/configure_macos_x86_64_ninja.cmake new file mode 100644 index 0000000..f657d98 --- /dev/null +++ b/.gitlab/ci/configure_macos_x86_64_ninja.cmake @@ -0,0 +1,3 @@ +set(CMake_TEST_GUI "ON" CACHE BOOL "") +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_x86_64_xcode.cmake b/.gitlab/ci/configure_macos_x86_64_xcode.cmake new file mode 100644 index 0000000..1b976d2 --- /dev/null +++ b/.gitlab/ci/configure_macos_x86_64_xcode.cmake @@ -0,0 +1,2 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake index 76c693d..3990430 100644 --- a/.gitlab/ci/download_qt.cmake +++ b/.gitlab/ci/download_qt.cmake @@ -4,31 +4,6 @@ cmake_minimum_required(VERSION 3.12) set(qt_version_major "5") set(qt_version_minor "15") set(qt_version_patch "1") -# This URL is only visible inside of Kitware's network. Please use your own Qt -# Account to obtain these files. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package") - set(qt_url_root "https://cmake.org/files/dependencies") -else () - set(qt_url_root "https://paraview.org/files/dependencies/internal/qt") -endif () - -# Determine the ABI to fetch for Qt. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015") - set(qt_platform "windows_x86") - set(msvc_year "2015") - set(qt_abi "win64_msvc${msvc_year}_64") -elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2017" OR - "$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019") - set(qt_platform "windows_x86") - set(msvc_year "2019") - set(qt_abi "win64_msvc${msvc_year}_64") -elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos") - set(qt_platform "mac_x64") - set(qt_abi "clang_64") -else () - message(FATAL_ERROR - "Unknown ABI to use for Qt") -endif () # Combined version variables. set(qt_version "${qt_version_major}.${qt_version_minor}.${qt_version_patch}") @@ -36,7 +11,21 @@ set(qt_version_nodot "${qt_version_major}${qt_version_minor}${qt_version_patch}" # Files needed to download. set(qt_files) -if (qt_platform STREQUAL "windows_x86") +if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows") + # Determine the ABI to fetch for Qt. + if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015") + set(qt_platform "windows_x86") + set(msvc_year "2015") + set(qt_abi "win64_msvc${msvc_year}_64") + elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2017" OR + "$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019") + set(qt_platform "windows_x86") + set(msvc_year "2019") + set(qt_abi "win64_msvc${msvc_year}_64") + else () + message(FATAL_ERROR "Unknown ABI to use for Qt") + endif () + set(qt_build_stamp "202009071110") set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}") @@ -47,29 +36,23 @@ if (qt_platform STREQUAL "windows_x86") endforeach () set(qt_subdir "${qt_version}/msvc${msvc_year}_64") -elseif (qt_platform STREQUAL "mac_x64") - if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos_package") - list(APPEND qt_files - "qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz") - set(qt_subdir "qt-5.15.2-macosx10.13-x86_64-arm64") - elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos10.10_package") - list(APPEND qt_files - "qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz") + + # This URL is only visible inside of Kitware's network. + # Please use your own Qt Account to obtain these files. + set(qt_url_root "https://paraview.org/files/dependencies/internal/qt") + set(qt_url_path "${qt_platform}/desktop/qt5_${qt_version_nodot}/qt.qt5.${qt_version_nodot}.${qt_abi}") +elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos") + if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos10.10_package") + list(APPEND qt_files "qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz") set(qt_subdir "qt-5.9.9-macosx10.10-x86_64-arm64") else () - set(qt_build_stamp "202009071110") - set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}") - - foreach (qt_component IN ITEMS qtbase) - list(APPEND qt_files - "${qt_file_name_prefix}${qt_component}-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z") - endforeach () - - set(qt_subdir "${qt_version}/clang_64") - endif () -else () - message(FATAL_ERROR - "Unknown files for ${qt_platform}") + list(APPEND qt_files "qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz") + set(qt_subdir "qt-5.15.2-macosx10.13-x86_64-arm64") + endif() + set(qt_url_root "https://cmake.org/files/dependencies") + set(qt_url_path "") +else() + message(FATAL_ERROR "Unknown OS to use for Qt") endif () # Verify that we know what directory will be extracted. @@ -79,11 +62,6 @@ if (NOT qt_subdir) endif () # Build up the path to the file to download. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package") - set(qt_url_path "") -else () - set(qt_url_path "${qt_platform}/desktop/qt5_${qt_version_nodot}/qt.qt5.${qt_version_nodot}.${qt_abi}") -endif () set(qt_url_prefix "${qt_url_root}/${qt_url_path}") # Include the file containing the hashes of the files that matter. diff --git a/.gitlab/ci/sccache.sh b/.gitlab/ci/sccache.sh index 77bedaa..12b8f9d 100755 --- a/.gitlab/ci/sccache.sh +++ b/.gitlab/ci/sccache.sh @@ -5,17 +5,16 @@ set -e readonly kernel="$(uname -s)-$(uname -m)" case $kernel in Linux-x86_64) - version="0.2.13" + version="v0.2.15" shatool="sha256sum" - sha256sum="28a5499e340865b08b632306b435913beb590fbd7b49a3f887a623b459fabdeb" + sha256sum="e5d03a9aa3b9fac7e490391bbe22d4f42c840d31ef9eaf127a03101930cbb7ca" platform="x86_64-unknown-linux-musl" ;; Linux-aarch64) - version="g6628e1f" + version="v0.2.15" shatool="sha256sum" - sha256sum="bb88adbb5a29c166ecaa78d0593493b609a7f84d91d1228502a908f319b513f0" + sha256sum="90d91d21a767e3f558196dbd52395f6475c08de5c4951a4c8049575fa6894489" platform="aarch64-unknown-linux-musl" - url="https://github.com/hwinit/sccache/releases/download/$version" ;; Darwin-x86_64) version="gfe63078" @@ -24,6 +23,13 @@ case $kernel in platform="x86_64-apple-darwin" url="https://paraview.org/files/dependencies" ;; + Darwin-arm64) + version="0.2.15-1-disk_cache_init" + shatool="shasum -a 256" + sha256sum="f7c9ff78e701810b8b1dbc2a163c7fda1177fc3f69c71f46e7a38242657a99fd" + platform="aarch64-apple-darwin" + url="https://cmake.org/files/dependencies/sccache" + ;; *) echo "Unrecognized platform $kernel" exit 1 @@ -49,3 +55,4 @@ curl -OL "$url/$tarball" $shatool --check sccache.sha256sum tar xf "$tarball" mv "$filename/sccache" . +chmod +x sccache diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 450bae7..7fe6277 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -24,18 +24,25 @@ # could run at the same time, so we drop it. GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" -.macos_ninja: +.macos_x86_64_ninja: extends: .macos_build variables: - CMAKE_CONFIGURATION: macos_ninja + CMAKE_CONFIGURATION: macos_x86_64_ninja CTEST_NO_WARNINGS_ALLOWED: 1 -.macos_makefiles: +.macos_arm64_ninja: extends: .macos_build variables: - CMAKE_CONFIGURATION: macos_makefiles + CMAKE_CONFIGURATION: macos_arm64_ninja + CTEST_NO_WARNINGS_ALLOWED: 1 + +.macos_x86_64_makefiles: + extends: .macos_build + + variables: + CMAKE_CONFIGURATION: macos_x86_64_makefiles CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" @@ -57,16 +64,23 @@ ### External testing -.macos_xcode: +.macos_x86_64_xcode: extends: .macos variables: - CMAKE_CONFIGURATION: macos_xcode + CMAKE_CONFIGURATION: macos_x86_64_xcode + CMAKE_GENERATOR: Xcode + +.macos_arm64_xcode: + extends: .macos + + variables: + CMAKE_CONFIGURATION: macos_arm64_xcode CMAKE_GENERATOR: Xcode ## Tags -.macos_builder_tags: +.macos_x86_64_builder_tags: tags: - cmake # Since this is a bare runner, pin to a project. - macos @@ -74,7 +88,7 @@ - xcode-12.3 - nonconcurrent -.macos_builder_tags_package: +.macos_x86_64_builder_tags_package: tags: - cmake # Since this is a bare runner, pin to a project. - macos @@ -83,7 +97,7 @@ - nonconcurrent - finder -.macos_builder_ext_tags: +.macos_x86_64_builder_ext_tags: tags: - cmake # Since this is a bare runner, pin to a project. - macos @@ -91,6 +105,22 @@ - xcode-12.3 - concurrent +.macos_arm64_builder_tags: + tags: + - cmake # Since this is a bare runner, pin to a project. + - macos-arm64 + - shell + - xcode-12.3 + - nonconcurrent + +.macos_arm64_builder_ext_tags: + tags: + - cmake # Since this is a bare runner, pin to a project. + - macos-arm64 + - shell + - xcode-12.3 + - concurrent + ## macOS-specific scripts .before_script_macos: &before_script_macos |