Skip to content

Commit

Permalink
Attempt to add Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuchita Khare committed Feb 21, 2024
1 parent f7acb37 commit e9647f7
Showing 1 changed file with 0 additions and 69 deletions.
69 changes: 0 additions & 69 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,75 +66,6 @@ pipeline {
} // steps
} // Setup

stage('Build and Docs') {
parallel {
stage('Build') {
steps {
withEnv(["XMOS_CMAKE_PATH=${WORKSPACE}/xcommon_cmake"]) {
withVenv {
withTools(params.TOOLS_VERSION) {
dir("host_xvf_control") {
sh "cmake -B build -G Ninja && cmake --build build"
}
dir("sw_audio_dsp/host_cmd_map") {
sh "cmake -B build -G Ninja && cmake --build build"
}
sh 'cp host_xvf_control/build/xvf_host host_xvf_control/build/*.so sw_audio_dsp/host_cmd_map/build'
zip dir: "sw_audio_dsp/host_cmd_map/build", zipFile: "host_control_linux.zip", archive: true
dir("sw_audio_dsp") {
dir("app_dsp_xk_evk_xu316") {
// check the notebook is clean
sh "jupyter nbconvert --clear-output dsp_design.ipynb --output=clean && diff dsp_design.ipynb clean.ipynb"
// run the notebook and save the output
sh "jupyter nbconvert --execute --ExecutePreprocessor.allow_errors=True --to html --output=xk_evk_xu316 dsp_design.ipynb"
archiveArtifacts artifacts: "xk_evk_xu316.html"
sh 'find bin -name "*.xe" | grep .' // fails if binaries don't exist
zip dir: "bin", zipFile: "xk_evk_xu316_bin.zip", archive: true
}
dir("app_dsp_xk_316_mc") {
// check the notebook is clean
sh "jupyter nbconvert --clear-output dsp_design.ipynb --output=clean && diff dsp_design.ipynb clean.ipynb"
// run the notebook and save the output
sh "jupyter nbconvert --execute --ExecutePreprocessor.allow_errors=True --to html --output=xk_316_mc dsp_design.ipynb"
archiveArtifacts artifacts: "xk_316_mc.html"
sh 'find bin -name "*.xe" | grep .' // fails if binaries don't exist
zip dir: "bin", zipFile: "xk_316_mc_bin.zip", archive: true
}
}
}
}
}
}
} // Build

stage('Docs') {
steps {
sh """docker run -u "\$(id -u):\$(id -g)" \
--rm \
-v ${WORKSPACE}/sw_audio_dsp:/build \
ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION -v"""
dir('sw_audio_dsp') {
archiveArtifacts artifacts: "doc/_out/pdf/*.pdf"
archiveArtifacts artifacts: "doc/_out/html/**/*"
sh 'find doc/_out/pdf -type f -not -name "*.pdf" -exec rm {} +' // delete latex junk
zip zipFile: "sw_audio_dsp_docs.zip", archive: true, dir: "doc/_out", exclude: "linkcheck/**"
}
} // steps
} // Docs
} // parallel
} // build and docs

stage('Archive sandbox') {
steps {
// remove all junk and archive
sh 'for dir in $(find -type d -name ".git"); do git -C $dir/.. clean -xdf; done'
// delete symlinks
sh 'find -type l -delete'
// delete non-git dirs
sh 'for dir in $(ls -A); do if [ ! -d $dir/.git ]; then rm -rf $dir; fi; done'
zip zipFile: "sw_audio_dsp_sandbox.zip", archive: true
}
} // Archive sandbox
} // stages
post {
cleanup {
Expand Down

0 comments on commit e9647f7

Please sign in to comment.