diff --git a/CI/gen_doc/Makefile b/CI/gen_doc/Makefile index 7ea28110..58c04c74 100644 --- a/CI/gen_doc/Makefile +++ b/CI/gen_doc/Makefile @@ -21,7 +21,7 @@ MLFLAGS := $(MLFLAGS) -wait else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) -MLPATH := /usr/local/MATLAB +MLPATH := /opt/MATLAB endif ifeq ($(UNAME_S),Darwin) MLPATH := /Applications diff --git a/CI/scripts/Makefile b/CI/scripts/Makefile index 4e91c392..e2aac3b5 100644 --- a/CI/scripts/Makefile +++ b/CI/scripts/Makefile @@ -21,7 +21,7 @@ MLFLAGS := $(MLFLAGS) -wait else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) -MLPATH := /usr/local/MATLAB +MLPATH := /opt/MATLAB endif ifeq ($(UNAME_S),Darwin) MLPATH := /Applications diff --git a/Jenkinsfile b/Jenkinsfile index 422d05c0..81612eee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,51 +1,45 @@ -//@Library('tfc-lib') _ -library(identifier: 'jenkinssharedlib@MATLAB-bootfiles', retriever: modernSCM( - [$class: 'GitSCMSource', - remote: 'https://github.com/ribhudp23/jenkinssharedlib-private-fork.git', - credentialsId: 'GH-SharedLib-Private-Fork-Access' -])) -https://github.com/ribhudp23/jenkinssharedlib-private-fork.git - -dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false) -dockerConfig.add("-e MLRELEASE=R2021b") -dockerHost = 'docker' - -//////////////////////////// - - -hdlBranches = ['main'] - -stage("Build Toolbox") { - dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) { - branchName -> - withEnv(['HDLBRANCH='+branchName]) { - checkout scm - sh 'git submodule update --init' - sh 'pip3 install -r requirements_doc.txt' - sh 'make -C ./CI/gen_doc doc' - - sh 'make -C ./CI/scripts gen_tlbx' - } - stash includes: '**', name: 'builtSources', useDefaultExcludes: false - archiveArtifacts artifacts: '*.mltbx', followSymlinks: false, allowEmptyArchive: true - } -} - -///////////////////////////////////////////////////// - - - -////////////////////////////////////////////////////// -node { - stage('Deploy Development') { - unstash "builtSources" - uploadArtifactory('PrecisionToolbox','*.mltbx') - } - if (env.BRANCH_NAME == 'main') { - stage('Deploy Production') { - unstash "builtSources" - uploadFTP('PrecisionToolbox','*.mltbx') - } - } - -} +@Library('tfc-lib@adef-ci') _ + +flags = gitParseFlags() + +dockerConfig = getDockerConfig(['MATLAB','Vivado','Internal'], matlabHSPro=false) +dockerConfig.add("-e MLRELEASE=R2023b") +dockerHost = 'docker' + +//////////////////////////// + +hdlBranches = ['main','hdl_2021_r2'] + +stage("Build Toolbox") { + dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) { + branchName -> + try { + withEnv(['HDLBRANCH='+branchName,'LC_ALL=C.UTF-8','LANG=C.UTF-8']) { + checkout scm + sh 'git submodule update --init' + sh 'make -C ./CI/scripts gen_tlbx' + } + } catch(Exception ex) { + if (branchName == 'hdl_2021_r2') { + error('Production Toolbox Build Failed') + } + else { + unstable('Development Build Failed') + } + } + if (branchName == 'hdl_2021_r2') { + local_stash('builtSources') + archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true + } + } +} + +////////////////////////////////////////////////////// + +node('baremetal || lab_b5') { + cstage('Deploy Development', "", flags) { + local_unstash("builtSources", '', false) + uploadArtifactory('PrecisionToolbox','*.mltbx') + } +} + diff --git a/JenkinsfileHW b/JenkinsfileHW index e72be7af..1ef98913 100644 --- a/JenkinsfileHW +++ b/JenkinsfileHW @@ -17,7 +17,7 @@ lock(label: 'adgt_test_harness_boards', quantity: 1){ // harness.set_env('telemetry_repo', 'http://gateway.englab:3000/mirrors/telemetry.git') // harness.set_env('telemetry_branch', 'master') harness.set_env('matlab_repo', 'https://github.com/analogdevicesinc/PrecisionToolbox.git') // Not necessary when using checkout scm - harness.set_env('matlab_release','R2021b') + harness.set_env('matlab_release','R2023b') harness.set_env('matlab_license','network') harness.set_matlab_timeout('30m')