Update rust env vars
Some checks failed
gitea-sync/luafcgi/pipeline/head There was a failure building this commit

This commit is contained in:
DanyLE 2023-01-26 20:23:48 +01:00
parent 452a582682
commit 90e5e7dc08

40
Jenkinsfile vendored
View File

@ -3,25 +3,29 @@
def build_luad() { def build_luad() {
sh ''' sh '''
set -e set -e
cd $WORKSPACE echo $HOME
mkdir -p build/$arch/opt/www/bin export RUSTUP_HOME=$HOME/.rustup/
DESTDIR=$WORKSPACE/build/$arch/opt/www/bin export CARGO_HOME=$HOME/.cargo/
target="x86_64-unknown-linux-gnu" source $HOME/.cargo/env
case $arch in cd $WORKSPACE
arm64) mkdir -p build/$arch/opt/www/bin
target="aarch64-unknown-linux-gnu" DESTDIR=$WORKSPACE/build/$arch/opt/www/bin
;; target="x86_64-unknown-linux-gnu"
case $arch in
arm64)
target="aarch64-unknown-linux-gnu"
;;
arm) arm)
target="armv7-unknown-linux-gnueabihf" target="armv7-unknown-linux-gnueabihf"
;; ;;
*) *)
;; ;;
esac esac
cargo build --target=$target --release cargo build --target=$target --release
file target/release/luad file target/release/luad
''' '''
} }
pipeline { pipeline {