summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-05-14 18:36:04 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-05-22 15:34:14 (GMT)
commit02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7 (patch)
tree567b777f6fa3123c6cea3f450fafee56dc4076a2 /.gitlab
parenta1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9 (diff)
downloadCMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.zip
CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.gz
CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.bz2
gitlab-ci: add a macos builder
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci/cmake.sh30
-rw-r--r--.gitlab/ci/configure_macos_makefiles.cmake1
-rw-r--r--.gitlab/ci/configure_macos_ninja.cmake1
-rwxr-xr-x.gitlab/ci/ninja.sh26
-rwxr-xr-x.gitlab/ci/sccache.sh28
5 files changed, 76 insertions, 10 deletions
diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh
index 4b2f53f..658a62a 100755
--- a/.gitlab/ci/cmake.sh
+++ b/.gitlab/ci/cmake.sh
@@ -3,14 +3,38 @@
set -e
readonly version="3.17.2"
-readonly sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
-readonly filename="cmake-$version-Linux-x86_64"
+
+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"
-sha256sum --check cmake.sha256sum
+$shatool --check cmake.sha256sum
tar xf "$tarball"
mv "$filename" cmake
+
+if [ "$( uname -s )" = "Darwin" ]; then
+ ln -s CMake.app/Contents/bin cmake/bin
+fi
diff --git a/.gitlab/ci/configure_macos_makefiles.cmake b/.gitlab/ci/configure_macos_makefiles.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_macos_makefiles.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/configure_macos_ninja.cmake b/.gitlab/ci/configure_macos_ninja.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_macos_ninja.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/ninja.sh b/.gitlab/ci/ninja.sh
index 31da12b..93c1ee9 100755
--- a/.gitlab/ci/ninja.sh
+++ b/.gitlab/ci/ninja.sh
@@ -3,13 +3,33 @@
set -e
readonly version="1.10.0"
-readonly sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
-readonly filename="ninja-linux"
+
+case "$( uname -s )" in
+ Linux)
+ shatool="sha256sum"
+ sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
+ platform="linux"
+ ;;
+ Darwin)
+ shatool="shasum -a 256"
+ sha256sum="2ee405c0e205d55666c60cc9c0d8d04c8ede06d3ef2e2c2aabe08fd81c17d22e"
+ platform="mac"
+ ;;
+ *)
+ echo "Unrecognized platform $( uname -s )"
+ exit 1
+ ;;
+esac
+readonly shatool
+readonly sha256sum
+readonly platform
+
+readonly filename="ninja-$platform"
readonly tarball="$filename.zip"
cd .gitlab
echo "$sha256sum $tarball" > ninja.sha256sum
curl -OL "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball"
-sha256sum --check ninja.sha256sum
+$shatool --check ninja.sha256sum
./cmake/bin/cmake -E tar xf "$tarball"
diff --git a/.gitlab/ci/sccache.sh b/.gitlab/ci/sccache.sh
index c88cdcc..f7d51ff 100755
--- a/.gitlab/ci/sccache.sh
+++ b/.gitlab/ci/sccache.sh
@@ -2,15 +2,35 @@
set -e
-readonly version="0.2.12"
-readonly sha256sum="26fd04c1273952cc2a0f359a71c8a1857137f0ee3634058b3f4a63b69fc8eb7f"
-readonly filename="sccache-$version-x86_64-unknown-linux-musl"
+readonly version="0.2.13"
+
+case "$( uname -s )" in
+ Linux)
+ shatool="sha256sum"
+ sha256sum="28a5499e340865b08b632306b435913beb590fbd7b49a3f887a623b459fabdeb"
+ platform="x86_64-unknown-linux-musl"
+ ;;
+ Darwin)
+ shatool="shasum -a 256"
+ sha256sum="f564e948abadfc9e409eb1cd7babf24c6784057d5506c3b0a04cdd37cd830ae9"
+ platform="x86_64-apple-darwin"
+ ;;
+ *)
+ echo "Unrecognized platform $( uname -s )"
+ exit 1
+ ;;
+esac
+readonly shatool
+readonly sha256sum
+readonly platform
+
+readonly filename="sccache-$version-$platform"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > sccache.sha256sum
curl -OL "https://github.com/mozilla/sccache/releases/download/$version/$tarball"
-sha256sum --check sccache.sha256sum
+$shatool --check sccache.sha256sum
tar xf "$tarball"
mv "$filename/sccache" .