Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Utkarsh Ayachit
ParaView-Superbuild
Commits
51108b6f
Commit
51108b6f
authored
Mar 10, 2021
by
Ben Boeckel
⛰
Browse files
ci: download an NSIS distribution
This avoids needing to install it on the runner host.
parent
f3937e65
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab/ci/download_nsis.cmake
0 → 100644
View file @
51108b6f
cmake_minimum_required
(
VERSION 3.12
)
set
(
nsis_url_root
"https://www.paraview.org/files/dependencies"
)
set
(
nsis_version
"3.06.1"
)
if
(
"$ENV{CMAKE_CONFIGURATION}"
MATCHES
"windows"
)
set
(
nsis_subdir
"nsis-
${
nsis_version
}
"
)
set
(
sha256sum
"d463ad11aa191ab5ae64edb3a439a4a4a7a3e277fcb138254317254f7111fba7"
)
else
()
message
(
FATAL_ERROR
"Unknown platform for nsis"
)
endif
()
set
(
filename
"
${
nsis_subdir
}
.zip"
)
# Download the file.
file
(
DOWNLOAD
"
${
nsis_url_root
}
/
${
filename
}
"
".gitlab/
${
filename
}
"
STATUS download_status
EXPECTED_HASH
"SHA256=
${
sha256sum
}
"
)
# Check the download status.
list
(
GET download_status 0 res
)
if
(
res
)
list
(
GET download_status 1 err
)
message
(
FATAL_ERROR
"Failed to download
${
filename
}
:
${
err
}
"
)
endif
()
# Extract the file.
execute_process
(
COMMAND
"
${
CMAKE_COMMAND
}
"
-E tar
xf
"
${
filename
}
"
WORKING_DIRECTORY
".gitlab"
RESULT_VARIABLE res
ERROR_VARIABLE err
ERROR_STRIP_TRAILING_WHITESPACE
)
if
(
res
)
message
(
FATAL_ERROR
"Failed to extract
${
filename
}
:
${
err
}
"
)
endif
()
# Move to a predictable prefix.
file
(
RENAME
".gitlab/
${
nsis_subdir
}
"
".gitlab/nsis"
)
.gitlab/os-windows.yml
View file @
51108b6f
...
...
@@ -80,6 +80,8 @@
-
git submodule update --init --recursive
.before_script_windows_deps
:
&before_script_windows_deps
-
cmake -P .gitlab/ci/download_nsis.cmake
-
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\nsis;$env:PATH"
-
cmake -P .gitlab/ci/download_qt.cmake
-
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH"
# Add the outputs to the PATH
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment