ci(fedora41): tune RVM build to speedup and minimize the final image
- Do not waste time looking for pre-built images for Fedora. Tell to `rvm` to always build from sources. - No need to update startup files (in the intermediate image). - Exclude useless (documentation) files from the final archive.
This commit is contained in:
parent
264c902403
commit
86e96322eb
@ -2,17 +2,40 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "gem: --no-document" > ~/.gemrc
|
||||
|
||||
gpg2 --keyserver hkps://keyserver.ubuntu.com \
|
||||
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
|
||||
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
||||
|
||||
curl -sSL https://get.rvm.io | bash -s stable
|
||||
curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles
|
||||
|
||||
export rvm_silence_banner=1
|
||||
|
||||
# keep version in sync with `env_fedora*_makefiles.cmake`
|
||||
/usr/local/rvm/bin/rvm install ruby-3.0.4
|
||||
/usr/local/rvm/bin/rvm install ruby-3.0.4 --no-docs --disable-binary
|
||||
|
||||
for p in archives examples gem-cache log src; do
|
||||
for p in archives docs examples gem-cache log src; do
|
||||
touch /usr/local/rvm/${p}/.tar_exclude
|
||||
done
|
||||
|
||||
tar -C /usr/local --exclude-tag-under=.tar_exclude -cf /root/rvm.tar rvm
|
||||
cat <<EOF >/tmp/exclude.lst
|
||||
*LICENSE*
|
||||
*/doc/*
|
||||
*/man/*
|
||||
*.md
|
||||
BSDL
|
||||
CONTRIBUTING.*
|
||||
COPYING
|
||||
LEGAL
|
||||
PSFL
|
||||
README.rdoc
|
||||
History.rdoc
|
||||
gem_make.out
|
||||
test-unit-*/test
|
||||
rss-*/test
|
||||
EOF
|
||||
tar -C /usr/local \
|
||||
--exclude-tag-under=.tar_exclude \
|
||||
--exclude-from=/tmp/exclude.lst \
|
||||
-cf /root/rvm.tar rvm
|
||||
|
Loading…
Reference in New Issue
Block a user