Skip to content

Commit

Permalink
Merge pull request #97 from microsoft/dev/jgoshi/FIcmake3_18
Browse files Browse the repository at this point in the history
FI cmake 3.18
  • Loading branch information
jgoshi committed Aug 11, 2020
2 parents 14721db + d566a39 commit fa172ee
Show file tree
Hide file tree
Showing 2,684 changed files with 106,771 additions and 103,851 deletions.
10 changes: 6 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ IncludeCategories:
Priority: 5
- Regex: '^(<|")Qt?[A-Z]'
Priority: 6
- Regex: '^(<|")cmsys/'
- Regex: '^<cmtp/'
Priority: 7
- Regex: '^(<|")cm_'
- Regex: '^(<|")cmsys/'
Priority: 8
- Regex: '^(<|")cm[A-Z][^.]+\.h'
- Regex: '^(<|")cm_'
Priority: 9
- Regex: '^(<|")cm[A-Z][^.]+\.h'
Priority: 10
- Regex: '^<[^.]+\.h'
Priority: 4
- Regex: '^<'
Priority: 1
- Regex: '.*'
Priority: 10
Priority: 11
...
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ modernize-*,\
-modernize-avoid-c-arrays,\
-modernize-use-nodiscard,\
-modernize-use-noexcept,\
-modernize-use-trailing-return-type,\
-modernize-use-transparent-functors,\
performance-*,\
readability-*,\
-readability-convert-member-functions-to-static,\
-readability-function-size,\
-readability-identifier-naming,\
-readability-implicit-bool-conversion,\
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Thanks for your interest in contributing to CMake! The GitHub repository
is a mirror provided for convenience, but CMake does not use GitHub pull
requests for contribution. Please see

https://gitlab.kitware.com/cmake/cmake/tree/master/CONTRIBUTING.rst
https://gitlab.kitware.com/cmake/cmake/-/tree/master/CONTRIBUTING.rst

for contribution instructions. GitHub OAuth may be used to sign in.
201 changes: 201 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
include:
# Metadata shared my many jobs
- local: .gitlab/rules.yml
- local: .gitlab/artifacts.yml

# OS builds.
- local: .gitlab/os-linux.yml
- local: .gitlab/os-macos.yml
- local: .gitlab/os-windows.yml

stages:
- build
- test
- test-ext

################################################################################
# Job declarations
#
# Each job must pull in each of the following keys:
#
# - a "base image"
# - a build script
# - tags for the jobs
# - rules for when to run the job
#
# Additionally, jobs may also contain:
#
# - artifacts
# - dependency/needs jobs for required jobs
################################################################################

# Lint builds

build:debian10-iwyu:
extends:
- .debian10_iwyu
- .cmake_build_linux
- .linux_builder_tags
- .run_automatically

build:fedora31-tidy:
extends:
- .fedora31_tidy
- .cmake_build_linux
- .linux_builder_tags_qt
- .run_automatically

build:fedora31-sphinx:
extends:
- .fedora31_sphinx
- .cmake_build_linux
- .linux_builder_tags_qt
- .run_automatically

# Linux builds

build:centos6-release:
extends:
- .release_linux
- .cmake_build_release_linux
- .cmake_release_artifacts
- .linux_builder_tags
- .run_manually

test:fedora31-makefiles:
extends:
- .fedora31_makefiles
- .cmake_test_linux_package
- .linux_builder_tags_qt
- .run_automatically
dependencies:
- build:centos6-release
needs:
- build:centos6-release

test:cuda10.2-nvidia:
extends:
- .cuda10.2_nvidia
- .cmake_test_linux_package
- .linux_builder_tags_cuda
- .run_automatically
dependencies:
- build:centos6-release
needs:
- build:centos6-release

build:fedora31-ninja:
extends:
- .fedora31_ninja
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags_qt
- .run_manually

test:fedora31-ninja:
extends:
- .fedora31_ninja
- .cmake_test_linux
- .linux_builder_tags_qt
- .cmake_test_artifacts
- .run_automatically
dependencies:
- build:fedora31-ninja
needs:
- build:fedora31-ninja

test:fedora31-ninja-multi:
extends:
- .fedora31_ninja_multi
- .cmake_test_linux_external
- .linux_builder_tags_qt
- .run_automatically
dependencies:
- test:fedora31-ninja
needs:
- test:fedora31-ninja

# macOS builds

build:macos-ninja:
extends:
- .macos_ninja
- .cmake_build_macos
- .cmake_build_artifacts
- .macos_builder_tags
- .run_manually

test:macos-ninja:
extends:
- .macos_ninja
- .cmake_test_macos
- .cmake_test_artifacts
- .macos_builder_tags
- .run_automatically
dependencies:
- build:macos-ninja
needs:
- build:macos-ninja

build:macos-makefiles:
extends:
- .macos_makefiles
- .cmake_build_macos
- .cmake_build_artifacts
- .macos_builder_tags
- .run_manually

test:macos-makefiles:
extends:
- .macos_makefiles
- .cmake_test_macos
- .macos_builder_tags
- .run_automatically
dependencies:
- build:macos-makefiles
needs:
- build:macos-makefiles

test:macos-xcode:
extends:
- .macos_xcode
- .cmake_test_macos_external
- .macos_builder_ext_tags
- .run_automatically
dependencies:
- test:macos-ninja
needs:
- test:macos-ninja

# Windows builds

build:windows-vs2019-x64-ninja:
extends:
- .windows_vs2019_x64_ninja
- .cmake_build_windows
- .cmake_build_artifacts
- .windows_builder_tags
- .run_manually

test:windows-vs2019-x64-ninja:
extends:
- .windows_vs2019_x64_ninja
- .cmake_test_windows
- .windows_builder_tags
- .cmake_test_artifacts
- .run_automatically
dependencies:
- build:windows-vs2019-x64-ninja
needs:
- build:windows-vs2019-x64-ninja

test:windows-vs2019-x64:
extends:
- .windows_vs2019_x64
- .cmake_test_windows_external
- .windows_builder_ext_tags
- .run_automatically
dependencies:
- test:windows-vs2019-x64-ninja
needs:
- test:windows-vs2019-x64-ninja
79 changes: 79 additions & 0 deletions .gitlab/artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Lists of paths for artifacts of various stages.

.cmake_build_artifacts:
artifacts:
expire_in: 1d
paths:
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/CTestTestfile.cmake
- build/*/CTestTestfile.cmake
- build/*/*/CTestTestfile.cmake
- build/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/CTestTestfile.cmake

# Allow CMake to find CMAKE_ROOT.
- build/CMakeFiles/CMakeSourceDir.txt

# Take the install tree.
- build/install/

# We need the main binaries.
- build/bin/
# The cache is needed for the installation test.
- build/CMakeCache.txt
# Test binaries. Eventually these might be better under
# `Source/Tests` or the like.
- build/Tests/EnforceConfig.cmake
- build/Tests/CMakeBuildTest.cmake
- build/Tests/CMakeBuildDoubleProjectTest.cmake
- build/Tests/CMake*/runcompilecommands
- build/Tests/CMake*/runcompilecommands.exe
- build/Tests/CMake*/test*
- build/Tests/CMake*/PseudoMemcheck/valgrind
- build/Tests/CMake*/PseudoMemcheck/purify
- build/Tests/CMake*/PseudoMemcheck/memcheck_fail
- build/Tests/CMake*/PseudoMemcheck/BC
- build/Tests/CMake*/PseudoMemcheck/valgrind.exe
- build/Tests/CMake*/PseudoMemcheck/purify.exe
- build/Tests/CMake*/PseudoMemcheck/memcheck_fail.exe
- build/Tests/CMake*/PseudoMemcheck/BC.exe
- build/Tests/CMake*/PseudoMemcheck/NoLog
- build/Tests/CMake*Lib/*LibTests
- build/Tests/CMake*Lib/*LibTests.exe
- build/Source/kwsys/cmsysTest*
- build/Source/kwsys/testConsoleBufChild.exe
- build/Utilities/cmcurl/curltest
- build/Utilities/cmcurl/curltest.exe
- build/Utilities/KWIML/test/kwiml_test
- build/Utilities/KWIML/test/kwiml_test.exe
- build/Source/kwsys/*cmsysTestDynload.*
- build/Source/kwsys/dynloaddir/cmsysTestDynloadImpl.dll
- build/Source/kwsys/dynloaddir/cmsysTestDynloadUse.dll

# Test directories.
- build/Tests/CTest*
- build/Tests/Find*
- build/Tests/Qt5*
- build/Tests/RunCMake/
- build/Tests/CMakeOnly/
- build/Tests/CMakeTests/

# CTest/CDash information.
- build/Testing/
- build/DartConfiguation.tcl
- build/CTestCustom.cmake

.cmake_release_artifacts:
artifacts:
expire_in: 5d
paths:
# Any packages made.
- build/cmake-*-Linux-x86_64.*

.cmake_test_artifacts:
artifacts:
expire_in: 1d
paths:
# Take the install tree.
- build/install/
18 changes: 18 additions & 0 deletions .gitlab/ci/cmake.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$erroractionpreference = "stop"

$version = "3.17.2"
$sha256sum = "CF82B1EB20B6FBE583487656FCD496490FFCCDFBCBBA0F26E19F1C9C63B0B041"
$filename = "cmake-$version-win64-x64"
$tarball = "$filename.zip"

$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"
40 changes: 40 additions & 0 deletions .gitlab/ci/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

set -e

readonly version="3.17.2"

case "$( uname -s )" in
Linux)
shatool="sha256sum"
sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
platform="Linux"
;;
Darwin)
shatool="shasum -a 256"
sha256sum="139500e20b080444fcafe57f24f57248c691c5187cce6695bee2b9aad6792c7d"
platform="Darwin"
;;
*)
echo "Unrecognized platform $( uname -s )"
exit 1
;;
esac
readonly shatool
readonly sha256sum
readonly platform

readonly filename="cmake-$version-$platform-x86_64"
readonly tarball="$filename.tar.gz"

cd .gitlab

echo "$sha256sum $tarball" > cmake.sha256sum
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
$shatool --check cmake.sha256sum
tar xf "$tarball"
mv "$filename" cmake

if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
13 changes: 13 additions & 0 deletions .gitlab/ci/configure_common.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "")

# We run the install right after the build. Avoid rerunning it when installing.
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "ON" CACHE BOOL "")
# Install CMake under the build tree.
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "")
set(CMake_TEST_INSTALL "OFF" CACHE BOOL "")

if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
endif ()

include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")

0 comments on commit fa172ee

Please sign in to comment.