From 90e5e7dc08eec56bbf39333a3e5836b68fb8605c Mon Sep 17 00:00:00 2001 From: DanyLE Date: Thu, 26 Jan 2023 20:23:48 +0100 Subject: [PATCH] Update rust env vars --- Jenkinsfile | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 81ce34c..1f9ef0c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,25 +3,29 @@ def build_luad() { sh ''' - set -e - cd $WORKSPACE - mkdir -p build/$arch/opt/www/bin - DESTDIR=$WORKSPACE/build/$arch/opt/www/bin - target="x86_64-unknown-linux-gnu" - case $arch in - arm64) - target="aarch64-unknown-linux-gnu" - ;; + set -e + echo $HOME + export RUSTUP_HOME=$HOME/.rustup/ + export CARGO_HOME=$HOME/.cargo/ + source $HOME/.cargo/env + cd $WORKSPACE + mkdir -p build/$arch/opt/www/bin + DESTDIR=$WORKSPACE/build/$arch/opt/www/bin + target="x86_64-unknown-linux-gnu" + case $arch in + arm64) + target="aarch64-unknown-linux-gnu" + ;; - arm) - target="armv7-unknown-linux-gnueabihf" - ;; - *) - ;; - esac - cargo build --target=$target --release - file target/release/luad - ''' + arm) + target="armv7-unknown-linux-gnueabihf" + ;; + *) + ;; + esac + cargo build --target=$target --release + file target/release/luad + ''' } pipeline {