-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from shuchitak/doc_fixes
Documentation cleanup
- Loading branch information
Showing
18 changed files
with
197 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,31 @@ | |
|
||
@Library('[email protected]') _ | ||
|
||
getApproval() | ||
def archiveLib(String repoName) { | ||
sh "git -C ${repoName} clean -xdf" | ||
sh "zip ${repoName}_sw.zip -r ${repoName}" | ||
archiveArtifacts artifacts: "${repoName}_sw.zip", allowEmptyArchive: false | ||
} | ||
|
||
def checkout_shallow() | ||
{ | ||
checkout scm: [ | ||
$class: 'GitSCM', | ||
branches: scm.branches, | ||
userRemoteConfigs: scm.userRemoteConfigs, | ||
extensions: [[$class: 'CloneOption', depth: 1, shallow: true, noTags: false]] | ||
] | ||
} | ||
getApproval() | ||
pipeline { | ||
agent none | ||
|
||
options { | ||
disableConcurrentBuilds() | ||
buildDiscarder(xmosDiscardBuildSettings()) | ||
skipDefaultCheckout() | ||
timestamps() | ||
// on develop discard builds after a certain number else keep forever | ||
buildDiscarder(logRotator( | ||
numToKeepStr: env.BRANCH_NAME ==~ /develop/ ? '25' : '', | ||
artifactNumToKeepStr: env.BRANCH_NAME ==~ /develop/ ? '25' : '' | ||
)) | ||
} | ||
|
||
parameters { | ||
string( | ||
name: 'TOOLS_VERSION', | ||
|
@@ -25,47 +35,53 @@ pipeline { | |
) | ||
string( | ||
name: 'XMOSDOC_VERSION', | ||
defaultValue: '6.1.2', | ||
defaultValue: 'v6.1.3', | ||
description: 'The xmosdoc version' | ||
) | ||
string( | ||
name: 'INFR_APPS_VERSION', | ||
defaultValue: 'v2.0.1', | ||
description: 'The infr_apps version' | ||
) | ||
} | ||
environment { | ||
REPO = 'lib_board_support' | ||
PYTHON_VERSION = "3.12.1" | ||
VENV_DIRNAME = ".venv" | ||
} | ||
|
||
stages { | ||
stage('Build and tests') { | ||
agent { | ||
label 'linux&&64' | ||
label 'documentation && linux && x86_64' | ||
} | ||
stages{ | ||
stage('Checkout'){ | ||
steps { | ||
println "Stage running on: ${env.NODE_NAME}" | ||
dir("${REPO}") { | ||
checkout scm | ||
checkout_shallow() | ||
createVenv() | ||
withTools(params.TOOLS_VERSION) { | ||
dir("examples") { | ||
sh "cmake -G \"Unix Makefiles\" -B build" | ||
sh 'cmake -G "Unix Makefiles" -B build -DDEPS_CLONE_SHALLOW=TRUE' | ||
} | ||
} | ||
} // dir | ||
} // steps | ||
} | ||
} // stage('Checkout') | ||
stage('Library checks') { | ||
steps { | ||
runLibraryChecks("${WORKSPACE}/${REPO}", "v2.0.1") | ||
warnError("lib checks") { | ||
runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}") | ||
} | ||
} // steps | ||
} // Library checks | ||
} // stage('Library checks') | ||
stage('Build examples'){ | ||
steps { | ||
dir("${REPO}/examples") { | ||
withVenv { | ||
withTools(params.TOOLS_VERSION) { | ||
sh "cmake -G \"Unix Makefiles\" -B build" | ||
sh 'cmake -G "Unix Makefiles" -B build -DDEPS_CLONE_SHALLOW=TRUE' | ||
archiveArtifacts artifacts: "build/manifest.txt", allowEmptyArchive: false | ||
sh "xmake -C build -j 16" | ||
archiveArtifacts artifacts: "**/*.xe", allowEmptyArchive: false | ||
|
@@ -74,7 +90,7 @@ pipeline { | |
} | ||
} | ||
} | ||
} | ||
} // stage('Build examples') | ||
stage('Test'){ | ||
steps { | ||
dir("${REPO}") { | ||
|
@@ -85,19 +101,21 @@ pipeline { | |
} | ||
} | ||
} | ||
} | ||
} // stage('Test') | ||
stage('Documentation') { | ||
steps { | ||
dir("${REPO}") { | ||
withVenv { | ||
sh "pip install git+ssh://[email protected]/xmos/xmosdoc@v${params.XMOSDOC_VERSION}" | ||
sh 'xmosdoc' | ||
zip zipFile: "${REPO}_docs.zip", archive: true, dir: 'doc/_build' | ||
} // withVenv | ||
warnError("Docs") { | ||
buildDocs() | ||
} // warnError("Docs") | ||
} // dir | ||
} // steps | ||
} // Documentation | ||
|
||
} // stage('Documentation') | ||
stage("Archive Lib") { | ||
steps { | ||
archiveLib(REPO) | ||
} | ||
} //stage("Archive Lib") | ||
} | ||
post { | ||
always{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.