void checkout_project() { checkout([ $class: 'GitSCM', branches: [ [name: '*/develop'] ], extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false] ], submoduleCfg: [], userRemoteConfigs: [ [credentialsId: 'gitea-jenkins', url: 'https://git.minres.com/Firmware/Firmwares.git'] ] ]) } void checkout_iss_project(String repoUrl, String branch = 'develop') { checkout([ $class: 'GitSCM', branches: [ [name: "*/${branch}"] ], extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false, shallow: true] ], submoduleCfg: [], userRemoteConfigs: [ [credentialsId: 'gitea-jenkins', url: repoUrl] ] ]) } void checkout_develop() { dir("bare-metal-bsp") { withCredentials([usernamePassword(credentialsId: 'gitea-jenkins', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { sh ("git pull origin develop") } } //sh("cd bare-metal-bsp && git checkout develop") } void make_hello(board) { sh("make -C hello-world/ BOARD=${board}") sh("make -C hello-world/ clean") } void cmake_hello(board,build_type,core_type) { sh("pwd") // sh("cd hello-world/") //sh("pwd") def flavor ="${board}_${build_type}_${core_type}" if (core_type=="32") flavor ="${board}_${build_type}" sh("cmake -B ${flavor} --preset=${flavor}") sh("cmake --build ${flavor}") } pipeline { agent { docker { image 'ubuntu-riscv' args '-v $HOME/.m2:/root/.m2' }} options { // using the Timestamper plugin we can add timestamps to the console log timestamps() skipStagesAfterUnstable() } stages { /*stage('checkout repo') { steps{ checkout_project()}} stage('checkout develop') { steps{ checkout_develop()}} stage('make iss') {steps { make_hello("iss")}} stage('make hifive1') {steps { make_hello("hifive1")}} stage('make TGC5L') {steps { make_hello("TGC5L")}} stage('make rtl') {steps { make_hello("rtl")}} stage('make ehrenberg') {steps { make_hello("ehrenberg")}} stage('make tgc_vp') {steps { make_hello("tgc_vp")}}*/ stage('make hello-world') { matrix { axes { axis{ name 'BOARD' values 'iss', 'moonlight', 'tgc_vp' } } stages { stage('Force sequential') { options { lock("One Board at a time") } stages { stage("make") { steps { make_hello("${BOARD}") } } } } } } } stage('CMAKE flow for hello-world') { matrix { axes { axis{ name 'BOARD' values 'ISS', 'Moonlight', 'TGC_VP' } axis{ name 'BUILD_TYPE' values 'Debug', 'Release' } axis{ name 'CORE_TYPE' values '32', '64' } } stages { stage('Force sequential') { options { lock("One Board at a time") } stages { stage("CMAKE") { steps { dir("hello-world"){ cmake_hello("${BOARD}","${BUILD_TYPE}","${CORE_TYPE}") } } } } } } } } stages{ stage("Checkout TGC-ISS, TGC-Compliance and TGC-GEN"){ steps { sh 'rm -rf * .??* ' checkout_iss_project("https://git.minres.com/TGFS/TGC-ISS.git", "develop") dir("TGC-COMPLIANCE"){ checkout_iss_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") } dir("TGC-GEN"){ checkout_iss_project("https://git.minres.com/TGFS/TGC-GEN.git", "develop") } } } stage("Generate cores and build TGC-ISS"){ steps { sh 'pwd' sh 'conan profile detect --force' sh 'rm -rf build' /* sh ''' for core in RV32GC; do for backend in interp; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done done for core in RV64GC; do for backend in interp; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done done ''' sh 'conan profile detect --force' sh 'rm -rf build' sh 'cmake -S . -B build --preset Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=OFF' sh 'cmake --build build -j' sh 'build/dbt-rise-tgc/tgc-sim --isa ?' */ } } } stage("start to check") { steps { sh 'pwd' } } } /* post { failure { sh("make -C hello-world/ clean") } } */ }