jenkinsfile: attempt to start building
This commit is contained in:
1 parent
56464338bb
commit
904bc20b2b
1 file changed
+15
-1
Vendored
+15
-1
@@ -1,3 +1,7 @@
|
|||||||
|
def getArch(target) {
|
||||||
|
return target.tokenize('-')[0]
|
||||||
|
}
|
||||||
|
|
||||||
def getGCCTarget(rust_target) {
|
def getGCCTarget(rust_target) {
|
||||||
targetMapping = [
|
targetMapping = [
|
||||||
"mips-unknown-linux-musl": "mips-linux-muslsf",
|
"mips-unknown-linux-musl": "mips-linux-muslsf",
|
||||||
@@ -26,6 +30,7 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
GCC_TARGET = getGCCTarget(TARGET)
|
GCC_TARGET = getGCCTarget(TARGET)
|
||||||
|
TARGET_ARCH = getArch(GCC_TARGET)
|
||||||
CC = "${GCC_TARGET}-gcc"
|
CC = "${GCC_TARGET}-gcc"
|
||||||
PATH = "${WORKSPACE}/${GCC_TARGET}-cross/bin:${env.HOME}/.cargo/bin:${env.PATH}"
|
PATH = "${WORKSPACE}/${GCC_TARGET}-cross/bin:${env.HOME}/.cargo/bin:${env.PATH}"
|
||||||
TOOLCHAIN_URL = "https://musl.cc/${GCC_TARGET}-cross.tgz"
|
TOOLCHAIN_URL = "https://musl.cc/${GCC_TARGET}-cross.tgz"
|
||||||
@@ -71,7 +76,16 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh "rustc --version"
|
sh "cargo build --release --target ${TARGET}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Archive artifact') {
|
||||||
|
steps {
|
||||||
|
dir("target/${TARGET}/release") {
|
||||||
|
sh "cp -v sqm-autorate-rust sqm-autorate-rust-${TARGET_ARCH}"
|
||||||
|
archiveArtifacts artifacts: "sqm-autorate-rust-${TARGET_ARCH}", fingerprint: true, onlyIfSuccessful: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user