Skip to content

Commit

Permalink
Merge pull request #110 from xmos/develop
Browse files Browse the repository at this point in the history
Major Update to v2.0.2
  • Loading branch information
astewart-xmos authored Oct 7, 2022
2 parents 5afe725 + 3e65d77 commit c355856
Show file tree
Hide file tree
Showing 621 changed files with 62,048 additions and 24,121 deletions.
14 changes: 14 additions & 0 deletions .github/scripts/build_tests_xcore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

pwd

cmake -B build.xcore -DXMATH_MATH_SMOKE_TEST=ON -DCMAKE_TOOLCHAIN_FILE=etc/xmos_cmake_toolchain/xs3a.cmake
cmake --build build.xcore

cp build.xcore/test/vect_tests/vect_tests.xe /artifacts
cp build.xcore/test/bfp_tests/bfp_tests.xe /artifacts
cp build.xcore/test/scalar_tests/scalar_tests.xe /artifacts
cp build.xcore/test/fft_tests/fft_tests.xe /artifacts
cp build.xcore/test/filter_tests/filter_tests.xe /artifacts
cp build.xcore/test/dct_tests/dct_tests.xe /artifacts
108 changes: 108 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support documentation.
#
# This file contains the workflows that are run prior to merging a pull request.

name: CI

on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'

# Allow manually triggering of the workflow.
workflow_dispatch: {}

jobs:
build_tests_xcore:
name: Build tests (XCore)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Pull builder container
run: |
docker pull ghcr.io/xmos/sdk_app_builder:develop
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
- name: Build
run: |
mkdir ~/artifacts
docker run --rm -w /lib_xcore_math -v ${{ github.workspace }}:/lib_xcore_math -v ~/artifacts:/artifacts ghcr.io/xmos/sdk_app_builder:develop bash -l .github/scripts/build_tests_xcore.sh
- name: Save Unit Test Artifacts
uses: actions/upload-artifact@v2
with:
name: unit_tests
path: ~/artifacts
retention-days: 5

build_tests_x86:
name: Build & Run Tests (x86)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
- name: Build Tests
working-directory: ~
run: |
cmake -B build.x86 ${{ github.workspace }}
cmake --build build.x86
- name: "Run Tests: scalar_tests"
working-directory: ~
run: ./build.x86/test/scalar_tests/scalar_tests -v

- name: "Run Tests: vect_tests"
working-directory: ~
run: ./build.x86/test/vect_tests/vect_tests -v

- name: "Run Tests: bfp_tests"
working-directory: ~
run: ./build.x86/test/bfp_tests/bfp_tests -v

- name: "Run Tests: fft_tests"
working-directory: ~
run: ./build.x86/test/fft_tests/fft_tests -v

- name: "Run Tests: filter_tests"
working-directory: ~
run: ./build.x86/test/filter_tests/filter_tests -v

- name: "Run Tests: dct_tests"
working-directory: ~
run: ./build.x86/test/dct_tests/dct_tests -v
51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support documentation.
#
# This file contains the workflows that are run prior to merging a pull request.

name: Docs

on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'

# Allow manually triggering of the workflow.
workflow_dispatch: {}

jobs:
build_documentation:
name: Build and package documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Pull doc_builder container
run: |
docker pull ghcr.io/xmos/doc_builder:main
- name: Build documentation
run: |
docker run --rm -t -u "$(id -u):$(id -g)" -v ${{ github.workspace }}:/build -e REPO:/build -e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc ghcr.io/xmos/doc_builder:main
- name: Save documentation artifacts
uses: actions/upload-artifact@v2
with:
name: lib_xcore_math_docs
path: ./doc/_build/html
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
retention-days: 5
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Pipfile.lock

# build cruft
_build
**/.build/
**/.build*/
**/build*/
**/bin/
lib_xs3_math/lib/
lib_xcore_math/lib/

# MacOS cruft
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "etc/xmos_cmake_toolchain"]
path = etc/xmos_cmake_toolchain
url = [email protected]:xmos/xmos_cmake_toolchain
Loading

0 comments on commit c355856

Please sign in to comment.