From c3a7fcc463b202aaf56a7f716754bff9ad97793d Mon Sep 17 00:00:00 2001 From: Pagadarai Date: Tue, 7 Jan 2025 14:50:09 -0600 Subject: [PATCH] matlab bindings: Added Jenkinsfile for testing MATLAB bindings --- JenkinsfileHWMATLAB | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 JenkinsfileHWMATLAB diff --git a/JenkinsfileHWMATLAB b/JenkinsfileHWMATLAB new file mode 100644 index 000000000..bfa91fe7b --- /dev/null +++ b/JenkinsfileHWMATLAB @@ -0,0 +1,66 @@ +// Pipeline +lock(label: 'adgt_test_harness_boards', quantity: 1){ + @Library('sdgtt-lib@adgt-test-harness') _ // Not necessary when we turn on global libraries :) + def hdlBranch = "NA" + def linuxBranch = "NA" + def bootPartitionBranch = "2022_r2" + def firmwareVersion = 'v0.34' + def bootfile_source = 'artifactory' // options: sftp, artifactory, http, local + def harness = getGauntlet(hdlBranch, linuxBranch, bootPartitionBranch, firmwareVersion, bootfile_source) + + //Update repos + harness.set_env('libiio_repo', 'http://gateway.englab:3000/mirrors/libiio.git') + harness.set_env('libiio_branch', 'v1p0_matlab_bindings') + harness.set_env('nebula_repo', 'http://gateway.englab:3000/mirrors/nebula.git') + harness.set_env('nebula_branch','main') + harness.set_env('nebula_config_branch','release') + // 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/TransceiverToolbox.git') // Not necessary when using checkout scm + harness.set_env('matlab_release','R2023b') + harness.set_env('matlab_license','network') + harness.set_matlab_timeout('8m') + + //Update nebula config from netbox + harness.set_update_nebula_config(true) + harness.set_env('nebula_config_source','netbox') + harness.set_env('netbox_ip','primary.englab') + harness.set_env('netbox_port','8000') + harness.set_env('netbox_base_url','netbox') + withCredentials([string(credentialsId: 'netbox_token', variable: 'TOKEN')]) { + harness.set_env('netbox_token', TOKEN) + } + + //Update agent with required deps + harness.set_required_agent(["sdg-nuc-01","sdg-nuc-02"]) + harness.set_env('update_container_lib', true) + harness.set_env('update_lib_requirements', true) + harness.update_agents() + + //Set other test parameters + harness.set_nebula_debug(true) + harness.set_enable_docker(true) + harness.set_env('docker_image', 'tfcollins/test-harness-ci-ubuntu-22_04:latest') + harness.set_docker_host_mode(true) // Set to false if using machine-specific license + harness.set_send_telemetry(false) + harness.set_elastic_server('192.168.10.1') + harness.set_required_hardware(["pluto"]) + harness.set_docker_args(['Vivado', 'MATLAB', 'udev']) + harness.set_nebula_local_fs_source_root("artifactory.analog.com") + + // Set stages (Stages are run sequentially on agents.) + harness.add_stage(harness.stage_library("UpdateBOOTFiles"), 'stopWhenFail', + harness.stage_library("RecoverBoard")) + + // Test stage + harness.set_matlab_commands(["addpath(genpath('test'))", + "pyenv('Version','/usr/bin/python3')", + "cd('bindings/matlab');runTests()"]) + harness.add_stage(harness.stage_library("MATLABTests"),'continueWhenFail') + + // Send results + harness.add_stage(harness.stage_library('SendResults'),'continueWhenFail') + + // Go go + harness.run_stages() +}