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() {
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 {