Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Add rust rpm provisioner to adm node #2382

Merged
merged 6 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ Vagrant.configure('2') do |config|
type: 'shell',
run: 'never',
path: 'scripts/load-diagnostics-db.sh'

adm.vm.provision 'build-rust-rpms',
type: 'shell',
run: 'never',
path: 'scripts/build_rust_rpms.sh'
end

#
Expand Down
21 changes: 21 additions & 0 deletions vagrant/scripts/build_rust_rpms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
yum install -y openssl-devel
yum install -y cargo rpm-build

[ -f /root/.cargo/bin/sccache ] && echo "sccache already installed. Skipping." || cargo install sccache

sed -i '/^export CARGO_HOME/d' /root/.bash_profile
sed -i '/^export SCCACHE_CACHE_SIZE/d' /root/.bash_profile
sed -i '/^export SCCACHE_DIR/d' /root/.bash_profile
sed -i '/^export RUSTC_WRAPPER/d' /root/.bash_profile

cat <<EOF >> /root/.bash_profile
export CARGO_HOME=/root/.cargo
export SCCACHE_CACHE_SIZE=40G
export SCCACHE_DIR=/root/.cache
export RUSTC_WRAPPER=/root/.cargo/bin/sccache
EOF

source /root/.bash_profile

cd /integrated-manager-for-lustre \
&& RPM_DIST=".$(date '+%s')" make copr-rpms