diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 2dd6d49..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,59 +0,0 @@ -stages: - - build - - test_hardware - - deploy - -variables: - GIT_SUBMODULE_STRATEGY: recursive - -# Default build -build:master: - tags: - - matlab - stage: build - script: - - export MLRELEASE=R2019b - - export INCLUDE_EXAMPLES=1 - #- ./CI/scripts/dockermake gen_sim_data - - ./CI/scripts/dockermake gen_tlbx - - mkdir mltbx - - ls *.mltbx - - cp *.mltbx mltbx/ - artifacts: - when: always - paths: - #- functionSignatures.json - #- +adi/+sim/ - - mltbx/ - -# Test streaming interfaces with hardware -test_hardware:Streaming_Hardware: - tags: - - matlab - - hardware - stage: test_hardware - dependencies: - - build:master - script: - - export MLRELEASE=R2019b - - cd CI/scripts - - make test_streaming - artifacts: - paths: - - logs/ - - Report.pdf - -# Deploy -deploy: - tags: - - matlab - stage: deploy - dependencies: - - build:master - script: - - echo "Complete" - artifacts: - paths: - - mltbx/ - - diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..703bc3e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,52 @@ +@Library('tfc-lib') _ + +dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false) +dockerConfig.add("-e MLRELEASE=R2020a") +dockerHost = 'docker' + +//////////////////////////// + +hdlBranches = ['master'] + +stage("Build Toolbox") { + dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) { + branchName -> + withEnv(['HDLBRANCH='+branchName]) { + checkout scm + sh 'git submodule update --init' + sh 'make -C ./CI/scripts gen_tlbx' + } + stash includes: '**', name: 'builtSources', useDefaultExcludes: false + archiveArtifacts artifacts: '*.mltbx', followSymlinks: false, allowEmptyArchive: true + } +} + +///////////////////////////////////////////////////// + +classNames = ['IMU'] + +stage("Hardware Streaming Tests") { + dockerParallelBuild(classNames, dockerHost, dockerConfig) { + branchName -> + withEnv(['HW='+branchName]) { + unstash "builtSources" + sh 'make -C ./CI/scripts test_streaming' + } + } +} + +////////////////////////////////////////////////////// + +node { + stage('Deploy Development') { + unstash "builtSources" + uploadArtifactory('SensorToolbox','*.mltbx') + } + if (env.BRANCH_NAME == 'master') { + stage('Deploy Production') { + unstash "builtSources" + //uploadFTP('SensorToolbox','*.mltbx') + } + } +} +