File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 34
34
machine_id_file=" $( mktemp) "
35
35
< /dev/urandom tr -dc ' a-zA-Z0-9' | fold -w 32 | head -n 1 > " ${machine_id_file} "
36
36
37
+ cmake_version=" ${CMAKE_VERSION:- " 3.31.6" } "
38
+ cmake_url=" ${CMAKE_URL:- " https://github.com/Kitware/CMake/releases/download" } "
39
+ cmake_home=" /opt/cmake"
40
+
37
41
exit_code=0
38
42
# Run the action we want on it but using an in-container build directory to prevent various permissions errors and files locally
39
43
" $CONTAINER_RUNTIME " run --rm -t -w " /tmp/source" -v " ${SOURCE_DIR} :/source:ro" \
@@ -44,6 +48,18 @@ exit_code=0
44
48
-e INPUT_PRE_COMMAND=" cp -R /source /tmp" \
45
49
-e INPUT_WORKING-DIRECTORY=" /tmp/source" \
46
50
lpenz/ghaction-cmake:0.19 \
51
+ sh -c " \
52
+ cmake_install_script=\"\$ (mktemp --suffix '.sh')\" && \
53
+ cmake_download_url=$( printf " %q" " ${cmake_url} /v${cmake_version} /cmake-${cmake_version} " ) \" -linux-\$ (uname -m).sh\" && \
54
+ echo \" Downloading CMake: \$ {cmake_download_url} -> \$ {cmake_install_script}\" && \
55
+ curl -jksSL -o \"\$ {cmake_install_script}\" \"\$ {cmake_download_url}\" && \
56
+ mkdir -p $( printf " %q" " ${cmake_home} " ) && \
57
+ echo \" Installing CMake: \$ {cmake_install_script} -> \" $( printf " %q" " ${cmake_home} " ) && \
58
+ sh \"\$ {cmake_install_script}\" --skip-license --exclude-subdir --prefix=$( printf " %q" " ${cmake_home} " ) && \
59
+ rm -f \"\$ {cmake_install_script}\" && \
60
+ export PATH=\" $( printf " %q" " ${cmake_home} /bin" ) :\$ {PATH}\" && \
61
+ cmake --version && \
62
+ entrypoint" \
47
63
|| exit_code=$?
48
64
49
65
rm -f " ${machine_id_file} "
You can’t perform that action at this time.
0 commit comments