From 06d1042adb282eb0ff0de0268e385c617e416fa3 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:04:06 +0800 Subject: [PATCH] feat update Jenkinsfile --- Jenkinsfile | 67 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a29c5e..00e79d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,31 +10,54 @@ pipeline { } stages { - stage('Checkout') { - steps { - cleanWs() - checkout scm + stage('Checkout') { + steps { + cleanWs() + checkout scm + } } - } - stage('Configure') { - steps { - sh 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON' + stage('BuildAndTest') { + matrix { + agent { + docker { + image 'art.uocat.com/tqcq/cross:v1.0.1' + } + } + axes { + axis { + name 'BUILD_TYPE' + values 'Debug', 'Release' + } + + axis { + name 'TOOLCHAIN' + values 'aarch64-linux-gnu', 'arm-linux-gnueabihf', 'arm-linux-gnueabi', 'host.gcc-m32', 'mips64el-linux-gnuabi64', 'mips-linux-gnu', 'riscv64-linux-gnu' + } + } } - } - stage('Build') { - steps { - sh 'cmake --build build --target all -- -j`nproc --ignore=4`' - } - } - stage('Test') { - steps { - sh 'cd build && ctest --output-on-failure -j `nproc --ignore=4`' - } - } - stage('Benchmark') { - steps { - sh 'cd build && ./bin/tile_bm_all' + + stages { + stage('Configure') { + steps { + sh 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON' + } + } + stage('Build') { + steps { + sh 'cmake --build build --target all -- -j`nproc --ignore=4`' + } + } + stage('Test') { + steps { + sh 'cd build && ctest --output-on-failure -j `nproc --ignore=4`' + } + } + stage('Benchmark') { + steps { + sh 'cd build && ./bin/tile_bm_all' + } + } } } }