Skip to content

Commit

Permalink
Merge pull request #410 from xross/develop
Browse files Browse the repository at this point in the history
Jenkinsfile: shallow clone and use infr_apps: develop
  • Loading branch information
xross authored Oct 25, 2024
2 parents 2e9c9c6 + 4c11e1c commit 09fda65
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 23 deletions.
45 changes: 36 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,34 @@

@Library('[email protected]') _

def checkout_shallow()
{
checkout scm: [
$class: 'GitSCM',
branches: scm.branches,
userRemoteConfigs: scm.userRemoteConfigs,
extensions: [[$class: 'CloneOption', depth: 1, shallow: true, noTags: false]]
]
}

def clone_test_deps() {
dir("${WORKSPACE}") {
sh "git clone [email protected]:xmos/test_support"
sh "git -C test_support checkout c820ebe67bea0596dabcdaf71a590c671385ac35"
}
}

def archiveLib(String repoName) {
sh "git -C ${repoName} clean -xdf"
zip zipFile: "${repoName}_sw.zip", dir: "${repoName}", archive: true, defaultExcludes: false
}

getApproval()

pipeline {
agent {
label 'x86_64 && linux'
}
environment {
REPO = 'lib_xud'
}
options {
buildDiscarder(xmosDiscardBuildSettings())
skipDefaultCheckout()
Expand Down Expand Up @@ -45,8 +57,14 @@ pipeline {
stage('Build examples') {
steps {
println "Stage running on ${env.NODE_NAME}"

script {
def (server, user, repo) = extractFromScmUrl()
env.REPO = repo
}

dir("${REPO}") {
checkout scm
checkout_shallow()

dir("examples") {
withTools(params.TOOLS_VERSION) {
Expand All @@ -59,14 +77,17 @@ pipeline {
} // Build examples

stage('Library checks') {
steps {
runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}")
}
steps {
warnError("Library checks failed")
{
runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}")
}
}
}

stage('Documentation') {
steps {
dir("${REPO}") {
dir(REPO) {
buildDocs()
}
}
Expand All @@ -75,7 +96,6 @@ pipeline {
stage('Tests')
{
steps {
// Note, moves to WORKSPACE
clone_test_deps()

withTools(params.TOOLS_VERSION) {
Expand All @@ -95,6 +115,13 @@ pipeline {
}
}
}

stage("Archive lib") {
steps
{
archiveLib(REPO)
}
}
}
post {
cleanup {
Expand Down
30 changes: 18 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,42 @@ The library provides functionality to act as a USB *device* only.
Features
********

* USB 2.0 Full-speed (12Mbps) and High-speed (480Mbps)
* Device mode
* Bulk, control, interrupt and isochronous endpoint types supported
* A complete worked example of a HID mouse
* USB 2.0 Full-speed (12Mbps) and High-speed (480Mbps)
* Device mode
* Bulk, control, interrupt and isochronous endpoint types supported
* A complete worked example of a HID mouse

************
Known Issues
Known issues
************

* SOF tokens are not CRC checked on XS3 based devices (see tests/test_sof_badcrc) (#99)
* SOF tokens are not CRC checked on XS3 based devices (see tests/test_sof_badcrc) (#99)

****************
Development repo
****************

* `lib_xud <https://www.github.com/xmos/lib_xud>`_

**************
Required Tools
Required tools
**************

* XMOS XTC Tools: 15.3.0
* XMOS XTC Tools: 15.3.0

*********************************
Required Libraries (dependencies)
Required libraries (dependencies)
*********************************

* None
* None

*************************
Related Application Notes
Related application notes
*************************

The following application notes use this library:

* `AN00136 - Example USB Vendor Specific Device <https://www.xmos.com/file/an00136>`_
* `AN00136 - Example USB Vendor Specific Device <https://www.xmos.com/file/an00136>`_

*******
Support
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file provides overrides to the Doxyfile configuration

PROJECT_NAME = lib_xud
PROJECT_BRIEF = "XMOS USB Device (XUD) Library"
PROJECT_BRIEF = "USB device library"

INPUT = ../lib_xud/api

Expand Down
2 changes: 1 addition & 1 deletion settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

lib_name: lib_xud
project: '{{lib_name}}'
title: '{{lib_name}}: USB Device Library'
title: '{{lib_name}}: USB device library'
version: 2.4.0

documentation:
Expand Down

0 comments on commit 09fda65

Please sign in to comment.