Skip to content

Commit

Permalink
Merge pull request #71 from xmos/release/v6.2.0
Browse files Browse the repository at this point in the history
Merge v6.2.0 to master
  • Loading branch information
ed-xmos authored Sep 30, 2024
2 parents 37550be + c321c06 commit 6cdb5b6
Show file tree
Hide file tree
Showing 48 changed files with 512 additions and 402 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
lib_spdif change log
====================

6.2.0
-----

* CHANGED: Use XCommon CMake for examples and tests

6.1.1
-----

Expand Down
97 changes: 74 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Library('xmos_jenkins_shared_library@v0.29.0') _
@Library('xmos_jenkins_shared_library@v0.34.0') _

getApproval()

Expand All @@ -8,22 +8,71 @@ pipeline {
}
environment {
REPO = 'lib_spdif'
VIEW = getViewName(REPO)
PYTHON_VERSION = "3.12.1"
}
options {
skipDefaultCheckout()
timestamps()
buildDiscarder(xmosDiscardBuildSettings())
// 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',
defaultValue: '15.3.0',
description: 'The XTC tools version'
)
string(
name: 'XMOSDOC_VERSION',
defaultValue: 'v6.0.0',
description: 'The xmosdoc version'
)
}
stages {
stage('Get view') {
stage('Get Sandbox') {
steps {
xcorePrepareSandbox("${VIEW}", "${REPO}")
println "Stage running on: ${env.NODE_NAME}"

sh 'git clone git@github.com:xmos/test_support'
sh 'cd test_support && git checkout 961532d89a98b9df9ccbce5abd0d07d176ceda40'

dir("${REPO}") {
checkout scm
createVenv()
withVenv(){
installPipfile(false)
}
withTools(params.TOOLS_VERSION) {
dir("examples") {
sh 'cmake -B build -G "Unix Makefiles"'
}
}
}
}
}
stage('Library checks') {
steps {
xcoreLibraryChecks("${REPO}", false)
runLibraryChecks("${WORKSPACE}/${REPO}", "v2.0.0")
}
}
stage('Documentation') {
steps {
dir("${REPO}") {
warnError("Docs") {
sh "docker pull ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION"
sh """docker run -u "\$(id -u):\$(id -g)" \
--rm \
-v \$(pwd):/build \
ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION -v html latex"""

// Zip and archive doc files
zip dir: "doc/_build/html", zipFile: "${REPO}_docs_html.zip"
archiveArtifacts artifacts: "${REPO}_docs_html.zip"
archiveArtifacts artifacts: "doc/_build/pdf/${REPO}*.pdf"
}
} // dir
}
}
// stage('Generate') {
Expand All @@ -35,24 +84,29 @@ pipeline {
// }
// }
// }
stage("Tests") {
stage('Build Examples') {
steps {
dir("${REPO}/tests"){
viewEnv(){
withVenv() {
sh "pytest -v --junitxml=pytest_result.xml"
dir("${REPO}/examples") {
withVenv(){
withTools(params.TOOLS_VERSION) {
sh 'cmake -B build -G "Unix Makefiles"'
sh 'xmake -j 16 -C build'
}
}
}
}
}
stage('xCORE builds and doc') {
archiveArtifacts artifacts: "**/bin/*.xe", fingerprint: true, allowEmptyArchive: true
} // dir
} // steps
} // stage
stage("Build and run tests") {
steps {
dir("${REPO}") {
xcoreAllAppsBuild('examples')
runXdoc("${REPO}/doc")
// Archive all the generated .pdf docs
archiveArtifacts artifacts: "${REPO}/**/pdf/*.pdf", fingerprint: true, allowEmptyArchive: true
dir("${REPO}/tests"){
withVenv(){
withTools(params.TOOLS_VERSION) {
sh 'cmake -B build -G "Unix Makefiles"'
sh 'xmake -j 16 -C build'
runPytest('-vv')
}
}
}
}
}
Expand All @@ -61,9 +115,6 @@ pipeline {
always {
junit "${REPO}/tests/pytest_result.xml"
}
success {
updateViewfiles()
}
cleanup {
xcoreCleanSandbox()
}
Expand Down
34 changes: 12 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
S/PDIF Component
################
S/PDIF Library
##############

:Version: 6.1.1
:Vendor: XMOS
:Scope: General Use

Summary
*******
Overview
--------

A software defined S/PDIF library that allows transmission and reception of S/PDIF data via xCORE
ports. S/PDIF is a digital data streaming interface. The components in the library are controlled
via C using the XMOS multicore extensions (xC) and provides both a S/PDIF receiver and transmitter.

Features
========
........

* Supports stereo S/PDIF receive for sample rates up to 192KHz
* Supports stereo S/PDIF transmit for sample rates up to 192KHz
* Fully compliant to the IEC60958 specification

Related Application Notes
=========================
.........................

The following application notes use this library:

* AN00231 - SPDIF Receive to I2S output using Asynchronous Sample Rate Conversion

Required Software (dependencies)
================================

* None
* `AN02003: SPDIF/ADAT/I2S Receive to |I2S| Slave Bridge with ASRC <https://www.xmos.com/file/an02003>`_

Documentation
=============
Several simple usage examples are also included in the ``examples`` directory.

You can find the documentation for this software in the /doc directory of the package.
Software version and dependencies
.................................

Support
=======
The CHANGELOG contains information about the current and previous versions.
For a list of direct dependencies, look for DEPENDENT_MODULES in lib_spdif/module_build_info.

This package is supported by XMOS Ltd. Issues can be raised against the software at: http://www.xmos.com/support
6 changes: 6 additions & 0 deletions deps.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Common dependencies for examples
set(APP_DEPENDENT_MODULES "lib_spdif"
"lib_sw_pll(2.2.0)"
"lib_xassert(4.2.0)"
"lib_logging(3.2.0)"
)
8 changes: 8 additions & 0 deletions doc/Doxyfile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file provides overrides to the Doxyfile configuration

PROJECT_NAME = lib_spdif
PROJECT_BRIEF = "SPDIF software libraries"

INPUT = ../lib_spdif/api

PREDEFINED = C_API= EXTERN_C= UNSAFE= __DOXYGEN__=1
10 changes: 10 additions & 0 deletions doc/exclude_patterns.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The following patterns are to be excluded from the documentation build
examples
test
tests/.pytest_cache
CHANGELOG.rst
LICENSE.rst
README.rst
README.md
tests/rx_capture/README.rst
tests/test_rx/README.rst
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6cdb5b6

Please sign in to comment.