Skip to content
代码片段 群组 项目
未验证 提交 fa1c334a 编辑于 作者: Peter Leitzen's avatar Peter Leitzen
浏览文件

CI: Strip binaries produced by setup-test-env

This reduces artifacts size from 321 MB to 208 MB.
上级 9cad01fc
No related branches found
No related tags found
无相关合并请求
...@@ -25,6 +25,7 @@ setup-test-env: ...@@ -25,6 +25,7 @@ setup-test-env:
- section_start "setup-test-env" "Setting up testing environment"; scripts/setup-test-env; section_end "setup-test-env"; - section_start "setup-test-env" "Setting up testing environment"; scripts/setup-test-env; section_end "setup-test-env";
- select_gitlab_workhorse_essentials - select_gitlab_workhorse_essentials
- section_start "gitaly-test-build" "Compiling Gitaly binaries"; scripts/gitaly-test-build; section_end "gitaly-test-build"; # Do not use 'bundle exec' here - section_start "gitaly-test-build" "Compiling Gitaly binaries"; scripts/gitaly-test-build; section_end "gitaly-test-build"; # Do not use 'bundle exec' here
- strip_executable_binaries "${TMP_TEST_FOLDER}"
artifacts: artifacts:
expire_in: 7d expire_in: 7d
paths: paths:
......
...@@ -91,6 +91,12 @@ function select_gitlab_workhorse_essentials() { ...@@ -91,6 +91,12 @@ function select_gitlab_workhorse_essentials() {
mv ${tmp_path} ${TMP_TEST_FOLDER} mv ${tmp_path} ${TMP_TEST_FOLDER}
} }
function strip_executable_binaries() {
local path="$1"
find "$path" -executable -type f ! -size 0 -print0 | xargs -0 grep -IL . | xargs strip || true
}
# Assets functions # Assets functions
function gitlab_assets_archive_doesnt_exist() { function gitlab_assets_archive_doesnt_exist() {
archive_doesnt_exist "${GITLAB_ASSETS_PACKAGE_URL}" archive_doesnt_exist "${GITLAB_ASSETS_PACKAGE_URL}"
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册