summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-29 10:42:07 -0400
committerBrad King <brad.king@kitware.com>2020-09-29 11:18:45 -0400
commit45633a6297f21fd0f95c4a6e8318cd9b334e2a94 (patch)
treef0d0750a9aea427d2b6bba8dfd4ac87b1ce0d213 /.gitlab
parent17decc46917f26199abe6e00a028d35497972d40 (diff)
downloadcmake-45633a6297f21fd0f95c4a6e8318cd9b334e2a94.tar.gz
gitlab-ci: add a job to make source packages
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/artifacts.yml3
-rw-r--r--.gitlab/ci/cmake_version.cmake3
-rwxr-xr-x.gitlab/ci/cmake_version.sh2
-rw-r--r--.gitlab/os-linux.yml19
4 files changed, 27 insertions, 0 deletions
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml
index f1c0c7ed37..1c24003ad6 100644
--- a/.gitlab/artifacts.yml
+++ b/.gitlab/artifacts.yml
@@ -74,6 +74,9 @@
# Any packages made.
- build/cmake-*-Linux-x86_64.*
- build/cmake-*-Darwin-x86_64.*
+ # Any source packages made.
+ - build/cmake-*.tar.gz
+ - build/cmake-*.zip
.cmake_test_artifacts:
artifacts:
diff --git a/.gitlab/ci/cmake_version.cmake b/.gitlab/ci/cmake_version.cmake
new file mode 100644
index 0000000000..ef9f7f287d
--- /dev/null
+++ b/.gitlab/ci/cmake_version.cmake
@@ -0,0 +1,3 @@
+get_filename_component(CMake_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
+include("${CMake_SOURCE_DIR}/Source/CMakeVersion.cmake")
+message(STATUS ${CMake_VERSION})
diff --git a/.gitlab/ci/cmake_version.sh b/.gitlab/ci/cmake_version.sh
new file mode 100755
index 0000000000..03b1614486
--- /dev/null
+++ b/.gitlab/ci/cmake_version.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+cmake -P "${BASH_SOURCE%/*}/cmake_version.cmake" | cut -d ' ' -f 2
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index dd11cca683..74b2de743a 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -11,6 +11,12 @@
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
LAUNCHER: "scl enable devtoolset-6 rh-python36 --"
+.linux_prep_source:
+ image: "fedora:32"
+
+ variables:
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
+
### Debian
.debian10:
@@ -143,6 +149,19 @@
- cmake --version
- ninja --version
+.cmake_prep_source_linux:
+ stage: prep
+
+ script:
+ - *before_script_linux
+ - dnf install --setopt=install_weak_deps=False -y git-core
+ - v="$(.gitlab/ci/cmake_version.sh)"
+ - mkdir -p build/
+ - git archive --format=tgz "--prefix=cmake-$v/" -o "build/cmake-$v.tar.gz" HEAD
+ - git -c core.autocrlf=true -c core.eol=crlf archive --format=zip --prefix="cmake-$v/" -o "build/cmake-$v.zip" HEAD
+
+ interruptible: true
+
.cmake_prep_doc_linux:
stage: prep