-
Notifications
You must be signed in to change notification settings - Fork 19
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 #71 from ed-xmos/feature/ap-1
Major lib_src update
- Loading branch information
Showing
491 changed files
with
29,515 additions
and
110,643 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Documentation | ||
|
||
on: | ||
schedule: | ||
# run at 5am every day | ||
- cron: '0 5 * * *' | ||
push: | ||
paths: | ||
- '.github/workflows/docs.yml' | ||
- 'settings.json' | ||
- 'doc/exclude_patterns.inc' | ||
- '**/doc/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/docs.yml' | ||
- 'settings.json' | ||
- 'doc/exclude-patterns.inc' | ||
- '**/doc/**' | ||
|
||
# Allow manually triggering the workflow. | ||
workflow_dispatch: {} | ||
|
||
env: | ||
XCORE_DOC_BUILDER: 'ghcr.io/xmos/doc_builder:v3.0.0' | ||
|
||
jobs: | ||
build_documentation: | ||
name: Build and package documentation | ||
if: github.repository_owner == 'xmos' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout this repo | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10.x' | ||
|
||
- name: Pull doc_builder container | ||
run: | | ||
docker pull ${XCORE_DOC_BUILDER} | ||
- name: Build documentation | ||
run: | | ||
pwd | ||
docker run --user "$(id -u):$(id -g)" --rm -v ${{ github.workspace }}:/build -e EXCLUDE_PATTERNS="/build/doc/exclude-patterns.inc" -e OUTPUT_DIR="/build/doc/_build" -e PDF=1 -e SKIP_LINK=1 ${XCORE_DOC_BUILDER} | ||
tree | ||
DOC_VERSION=$(grep version settings.json | grep -o "[0-9]*\.[0-9]*\.[0-9]") | ||
mv doc/_build/pdf/programming_guide.pdf doc/_build/pdf/programming_guide_v${DOC_VERSION}.pdf | ||
- name: Save documentation artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs lib_src | ||
path: doc/_build | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | ||
retention-days: 30 |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "xmos_cmake_toolchain"] | ||
path = xmos_cmake_toolchain | ||
url = [email protected]:xmos/xmos_cmake_toolchain.git |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
tests/asrc_test/model/ASRC.c | ||
tests/asrc_test/model/ASRC.h | ||
tests/asrc_test/model/FIR.c | ||
tests/asrc_test/model/FIR.h | ||
tests/asrc_test/model/FilterDefs.c | ||
tests/asrc_test/model/FilterDefs.h | ||
tests/asrc_test/model/IntArithmetic.c | ||
tests/asrc_test/model/IntArithmetic.h | ||
tests/asrc_test/model/Main.c | ||
tests/asrc_test/model/Main.h | ||
tests/ds3_test/model/FIRDS3.c | ||
tests/ds3_test/model/FIRDS3.h | ||
tests/ds3_test/model/IntArithmetic.c | ||
tests/ds3_test/model/IntArithmetic.h | ||
tests/ds3_test/model/Main.c | ||
tests/ds3_test/model/Main.h | ||
tests/os3_test/model/FIROS3.c | ||
tests/os3_test/model/FIROS3.h | ||
tests/os3_test/model/IntArithmetic.c | ||
tests/os3_test/model/IntArithmetic.h | ||
tests/os3_test/model/Main.c | ||
tests/os3_test/model/Main.h | ||
tests/ssrc_test/model/FIR.c | ||
tests/ssrc_test/model/FIR.h | ||
tests/ssrc_test/model/FilterDefs.c | ||
tests/ssrc_test/model/FilterDefs.h | ||
tests/ssrc_test/model/IntArithmetic.c | ||
tests/ssrc_test/model/IntArithmetic.h | ||
tests/ssrc_test/model/Main.c | ||
tests/ssrc_test/model/Main.h | ||
tests/ssrc_test/model/SSRC.c | ||
tests/ssrc_test/model/SSRC.h |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,153 @@ | ||
@Library('[email protected]') _ | ||
@Library('[email protected]') | ||
|
||
def runningOn(machine) { | ||
println "Stage running on:" | ||
println machine | ||
} | ||
|
||
// run pytest with common flags for project. any passed in though extra args will | ||
// be appended | ||
def localRunPytest(String extra_args="") { | ||
catchError{ | ||
sh "python -m pytest --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all ${extra_args}" | ||
} | ||
junit "pytest_result.xml" | ||
} | ||
|
||
getApproval() | ||
|
||
pipeline { | ||
agent { | ||
label 'x86_64&&macOS' | ||
label 'x86_64&&macOS' // These agents have 24 cores so good for parallel xsim runs | ||
} | ||
environment { | ||
REPO = 'lib_src' | ||
VIEW = getViewName(REPO) | ||
PYTHON_VERSION = "3.10.5" | ||
VENV_DIRNAME = ".venv" | ||
} | ||
options { | ||
skipDefaultCheckout() | ||
} | ||
parameters { | ||
string( | ||
name: 'TOOLS_VERSION', | ||
defaultValue: '15.2.1', | ||
description: 'The XTC tools version' | ||
) | ||
} | ||
stages { | ||
stage('Get view') { | ||
stage('Get repo') { | ||
steps { | ||
sh "mkdir ${REPO}" | ||
// source checks require the directory | ||
// name to be the same as the repo name | ||
dir("${REPO}") { | ||
// checkout repo | ||
checkout scm | ||
sh 'git submodule update --init --recursive --depth 1' | ||
} | ||
} | ||
} | ||
stage ("Create Python environment") | ||
{ | ||
steps { | ||
xcorePrepareSandbox("${VIEW}", "${REPO}") | ||
dir("${REPO}") { | ||
createVenv('requirements.txt') | ||
withVenv { | ||
sh 'pip install -r requirements.txt' | ||
} | ||
} | ||
} | ||
} | ||
stage('Library checks') { | ||
steps { | ||
xcoreLibraryChecks("${REPO}") | ||
dir("${REPO}") { | ||
sh 'git clone [email protected]:xmos/infr_apps.git' | ||
sh 'git clone [email protected]:xmos/infr_scripts_py.git' | ||
// These are needed for xmake legacy build and also changelog check | ||
sh 'git clone [email protected]:xmos/lib_logging.git' | ||
sh 'git clone [email protected]:xmos/lib_xassert.git' | ||
withVenv { | ||
sh 'pip install -e infr_scripts_py' | ||
sh 'pip install -e infr_apps' | ||
dir("tests") { | ||
withEnv(["XMOS_ROOT=.."]) { | ||
localRunPytest('-s test_lib_checks.py -vv') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('xCORE builds') { | ||
stage('Test xmake build') { | ||
steps { | ||
runningOn(env.NODE_NAME) | ||
dir("${REPO}") { | ||
xcoreAllAppsBuild('examples') | ||
xcoreAllAppNotesBuild('examples') | ||
dir("${REPO}") { | ||
runXdoc('doc') | ||
withTools(params.TOOLS_VERSION) { | ||
withVenv { | ||
dir("tests") { | ||
localRunPytest('-k "legacy" -vv') | ||
} | ||
} | ||
} | ||
} | ||
// Archive all the generated .pdf docs | ||
archiveArtifacts artifacts: "${REPO}/**/pdf/*.pdf", fingerprint: true, allowEmptyArchive: true | ||
} | ||
} | ||
stage('Tests') { | ||
stage('Tests XS2') { | ||
steps { | ||
runXmostest("${REPO}", 'tests') | ||
runningOn(env.NODE_NAME) | ||
dir("${REPO}") { | ||
withTools(params.TOOLS_VERSION) { | ||
withVenv { | ||
sh 'mkdir build' | ||
dir("build") { | ||
sh 'rm -rf' | ||
sh 'cmake --toolchain ../xmos_cmake_toolchain/xs2a.cmake ..' | ||
sh 'make test_ds3_voice test_us3_voice test_unity_gain_voice -j' | ||
} | ||
dir("tests") { | ||
localRunPytest('-n auto -k "xs2" -vv') | ||
} | ||
dir("build") { | ||
sh 'rm -rf' // Cleanup XS2 cmake cache for next stage | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Tests XS3') { | ||
steps { | ||
runningOn(env.NODE_NAME) | ||
dir("${REPO}") { | ||
withTools(params.TOOLS_VERSION) { | ||
withVenv { | ||
dir("tests") { | ||
localRunPytest('-m prepare') // Do all pre work like building and generating golden ref where needed | ||
|
||
// FF3 HiFi tests for OS3 and DS3 | ||
localRunPytest('-m main -n auto -k "hifi_ff3" -vv') | ||
|
||
// ASRC and SSRC tests across all in/out freqs and deviations (asrc only) | ||
localRunPytest('-m main -n auto -k "mrhf" -vv') | ||
archiveArtifacts artifacts: "mips_report*.csv", allowEmptyArchive: true | ||
|
||
// VPU enabled ff3 and rat tests | ||
localRunPytest('-m main -k "vpu" -vv') // xdist not working yet so no -n auto | ||
|
||
// Profile the ASRC | ||
localRunPytest('-m main -k "profile_asrc" -vv') | ||
sh 'tree' | ||
archiveArtifacts artifacts: "gprof_results/*.png", allowEmptyArchive: true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
success { | ||
updateViewfiles() | ||
} | ||
cleanup { | ||
xcoreCleanSandbox() | ||
} | ||
|
Oops, something went wrong.