mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
ci: Add script to install appimagetool in Linux jobs
This commit is contained in:
1
.gitlab/.gitignore
vendored
1
.gitlab/.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Ignore files known to be downloaded by CI jobs.
|
||||
/5.15.1-0-202009071110*
|
||||
/appimagetool
|
||||
/bcc*
|
||||
/cmake*
|
||||
/emsdk
|
||||
|
||||
3
.gitlab/ci/appimagetool-env.sh
Normal file
3
.gitlab/ci/appimagetool-env.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
.gitlab/ci/appimagetool.sh
|
||||
export PATH=$PWD/.gitlab/appimagetool/bin:$PATH
|
||||
appimagetool --version
|
||||
32
.gitlab/ci/appimagetool.sh
Executable file
32
.gitlab/ci/appimagetool.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
readonly version="1.9.0.20250814"
|
||||
|
||||
case "$(uname -s)-$(uname -m)" in
|
||||
Linux-x86_64)
|
||||
shatool="sha256sum"
|
||||
sha256sum="6414d395eafee09453d2e203d9cc65f867e6ff7e1a8a6c08e444d86cb1d106ad"
|
||||
filename="appimagetool-$version-x86_64"
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized platform $(uname -s)-$(uname -m)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
readonly shatool
|
||||
readonly sha256sum
|
||||
|
||||
cd .gitlab
|
||||
|
||||
# This URL is only visible inside of Kitware's network. See above filename table.
|
||||
baseurl="https://cmake.org/files/dependencies/internal"
|
||||
|
||||
tarball="$filename.tar.gz"
|
||||
echo "$sha256sum $tarball" > appimagetool.sha256sum
|
||||
curl -OL "$baseurl/$tarball"
|
||||
$shatool --check appimagetool.sha256sum
|
||||
tar xzf "$tarball"
|
||||
rm "$tarball" appimagetool.sha256sum
|
||||
mv "$filename" "appimagetool"
|
||||
28
.gitlab/ci/repackage/appimagetool.sh
Executable file
28
.gitlab/ci/repackage/appimagetool.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
arch="$1"
|
||||
version="${2-1.9.0.20250814}"
|
||||
|
||||
dir="appimagetool-$version-$arch"
|
||||
mkdir "$dir"
|
||||
mkdir -p "$dir/lib/appimagetool"
|
||||
|
||||
filename="appimagetool-$arch.AppImage"
|
||||
curl -OL "https://github.com/AppImage/appimagetool/releases/download/continuous/$filename"
|
||||
chmod +x "$filename"
|
||||
"./$filename" --appimage-extract
|
||||
mv "squashfs-root/usr/bin" "$dir/bin"
|
||||
rm -rf "$filename" "squashfs-root"
|
||||
|
||||
filename="runtime-$arch"
|
||||
curl -OL "https://github.com/AppImage/type2-runtime/releases/download/continuous/$filename"
|
||||
mv "$filename" "$dir/lib/appimagetool/runtime"
|
||||
|
||||
cat >"$dir/README.txt" <<EOF
|
||||
This was packaged using CMake's ".gitlab/ci/repackage/appimagetool.sh" script.
|
||||
EOF
|
||||
|
||||
tar czf "$dir.tar.gz" "$dir"
|
||||
rm -rf "$dir"
|
||||
Reference in New Issue
Block a user