mirror of
https://github.com/antos-rde/antos.git
synced 2025-04-29 20:26:45 +02:00
improve: optimize pipeline + clean C based project before build
Some checks reported errors
gitea-sync/antos/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
gitea-sync/antos/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
parent
7ce96d1c31
commit
84e7a1a1a2
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -1,4 +1,4 @@
|
||||
def build_rust_and_frontend() {
|
||||
def build_rust_mod() {
|
||||
sh '''#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
@ -52,7 +52,7 @@ def build_server_and_backend() {
|
||||
PLATFORM=$arch \
|
||||
FRONTEND_IGNORE=true \
|
||||
LUAFCGI_IGNORE=true \
|
||||
make
|
||||
make clean_c all
|
||||
'''
|
||||
}
|
||||
|
||||
@ -112,7 +112,23 @@ pipeline {
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build RUST + FRONTEND AMD64') {
|
||||
stage('Build Frontend (TS)') {
|
||||
agent {
|
||||
node { label'workstation' }
|
||||
}
|
||||
steps {
|
||||
sh'''
|
||||
mkdir -p build/frontend/
|
||||
DESTDIR=$(realpath build/frontend/) make frontend
|
||||
for arch in arm arm64 amd64; do
|
||||
mkdir build/$arch
|
||||
cp -rf build/frontend/* build/$arch/
|
||||
done
|
||||
rm -rf build/frontend
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build RUST MODULE AMD64') {
|
||||
agent {
|
||||
node { label'workstation' }
|
||||
}
|
||||
@ -120,10 +136,10 @@ pipeline {
|
||||
script {
|
||||
env.arch = 'amd64'
|
||||
}
|
||||
build_rust_and_frontend()
|
||||
build_rust_mod()
|
||||
}
|
||||
}
|
||||
stage('Build RUST + FRONTEND ARM64') {
|
||||
stage('Build RUST MODULE ARM64') {
|
||||
agent {
|
||||
node { label'workstation' }
|
||||
}
|
||||
@ -131,10 +147,10 @@ pipeline {
|
||||
script {
|
||||
env.arch = 'arm64'
|
||||
}
|
||||
build_rust_and_frontend()
|
||||
build_rust_mod()
|
||||
}
|
||||
}
|
||||
stage('Build RUST + FRONTEND ARM') {
|
||||
stage('Build RUST MODULE ARM') {
|
||||
agent {
|
||||
node { label'workstation' }
|
||||
}
|
||||
@ -142,7 +158,7 @@ pipeline {
|
||||
script {
|
||||
env.arch = 'arm'
|
||||
}
|
||||
build_rust_and_frontend()
|
||||
build_rust_mod()
|
||||
}
|
||||
}
|
||||
|
||||
|
23
Makefile
23
Makefile
@ -86,16 +86,19 @@ else
|
||||
@echo "Ignore building $@"
|
||||
endif
|
||||
|
||||
clean:
|
||||
@echo "Clean all target"
|
||||
make -C antd/ant-http clean
|
||||
make -C antd/antd-fcgi-plugin clean
|
||||
make -C antd/antd-tunnel-plugin clean
|
||||
make -C antd/antd-wvnc-plugin clean
|
||||
make -C antd/antd-tunnel-publishers clean
|
||||
make -C antd/luasec clean
|
||||
make -C antd/luasocket clean
|
||||
make -C antd/silk clean
|
||||
clean_c:
|
||||
@echo "Clean all C based modules"
|
||||
-make -C antd/ant-http clean
|
||||
-make -C antd/antd-fcgi-plugin clean
|
||||
-make -C antd/antd-tunnel-plugin clean
|
||||
-make -C antd/antd-wvnc-plugin clean
|
||||
-make -C antd/antd-tunnel-publishers clean
|
||||
-make -C antd/luasec clean
|
||||
-make -C antd/luasocket clean
|
||||
-make -C antd/silk clean
|
||||
|
||||
clean: clean_c
|
||||
@echo "Clean Rust project and output DIR"
|
||||
RUSTUP_HOME=$(RUSTUP_HOME) CARGO_HOME=$(CARGO_HOME) \
|
||||
. $(CARGO_HOME)/env && cargo clean \
|
||||
--manifest-path=$(ROOT_DIR)/antd/luafcgi/Cargo.toml \
|
||||
|
Loading…
x
Reference in New Issue
Block a user