-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,033 changed files
with
61,117 additions
and
180,970 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,93 @@ | ||
# clang-format configuration file | ||
# | ||
# For more information, see: | ||
# | ||
# Documentation/process/clang-format.rst | ||
# https://clang.llvm.org/docs/ClangFormat.html | ||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
# | ||
--- | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignOperands: true | ||
AlignTrailingComments: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: false | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Custom | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: false | ||
ColumnLimit: 80 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 8 | ||
ContinuationIndentWidth: 8 | ||
Cpp11BracedListStyle: false | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
IncludeCategories: | ||
- Regex: '.*' | ||
Priority: 1 | ||
IndentCaseLabels: false | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 8 | ||
ObjCSpaceAfterProperty: true | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakBeforeFirstCallParameter: 30 | ||
PenaltyBreakComment: 10 | ||
PenaltyBreakFirstLessLess: 0 | ||
PenaltyBreakString: 10 | ||
PenaltyExcessCharacter: 100 | ||
PenaltyReturnTypeOnItsOwnLine: 60 | ||
PointerAlignment: Right | ||
ReflowComments: false | ||
SortIncludes: false | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp03 | ||
TabWidth: 4 | ||
UseTab: Never | ||
... |
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,52 @@ | ||
# 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. | ||
|
||
name: Build the SDK Docker container | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
# Allow manually triggering of the workflow. | ||
workflow_dispatch: {} | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
SDK_APP_BUILDER: xmos/sdk_app_builder | ||
|
||
jobs: | ||
build-image: | ||
name: Build Docker image for building and testing applications | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to the Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.SDK_APP_BUILDER }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: '.' | ||
file: 'tools/ci/Dockerfile.apps' | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,155 @@ | ||
# 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 - Examples | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
|
||
# Allow manually triggering of the workflow. | ||
workflow_dispatch: {} | ||
|
||
env: | ||
SDK_BUILDER_IMAGE: 'ghcr.io/xmos/sdk_app_builder:develop' | ||
|
||
jobs: | ||
build_host_apps: | ||
name: Build host applications | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Pull SDK builder | ||
run: | | ||
docker pull ${SDK_BUILDER_IMAGE} | ||
- name: Build | ||
run: | | ||
docker run --rm -w /xcore_sdk -v ${{github.workspace}}:/xcore_sdk ${SDK_BUILDER_IMAGE} bash -l tools/ci/build_host_apps.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: host_apps | ||
path: ./dist_host | ||
|
||
build_rtos_core_examples: | ||
name: Build RTOS core examples | ||
runs-on: ubuntu-latest | ||
needs: build_host_apps | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Pull SDK builder | ||
run: | | ||
docker pull ${SDK_BUILDER_IMAGE} | ||
- name: Download host build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: host_apps | ||
path: ./dist_host | ||
|
||
- name: Build | ||
run: | | ||
docker run --rm -w /xcore_sdk -v ${{github.workspace}}:/xcore_sdk ${SDK_BUILDER_IMAGE} bash -l tools/ci/build_rtos_core_examples.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: freertos_core_examples | ||
path: | | ||
./dist/*.xe | ||
./dist/*.fs | ||
./dist/*.swmem | ||
build_rtos_aiot_examples: | ||
name: Build RTOS AIoT examples | ||
runs-on: ubuntu-latest | ||
needs: build_host_apps | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install Python requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tools/install/requirements.txt | ||
- name: Make input data for examples | ||
run: | | ||
cd ./examples/freertos/cifar10/filesystem_support/test_inputs && python make_test_tensors.py | ||
- name: Pull SDK builder | ||
run: | | ||
docker pull ${SDK_BUILDER_IMAGE} | ||
- name: Download host build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: host_apps | ||
path: ./dist_host | ||
|
||
- name: Build | ||
run: | | ||
docker run --rm -w /xcore_sdk -v ${{github.workspace}}:/xcore_sdk ${SDK_BUILDER_IMAGE} bash -l tools/ci/build_rtos_aiot_examples.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: freertos_aiot_examples | ||
path: | | ||
./dist/*.xe | ||
./dist/*.fs | ||
./dist/*.swmem | ||
build_metal_examples: | ||
name: Build bare-metal examples | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Pull SDK builder | ||
run: | | ||
docker pull ${SDK_BUILDER_IMAGE} | ||
- name: Build | ||
run: | | ||
docker run --rm -w /xcore_sdk -v ${{github.workspace}}:/xcore_sdk ${SDK_BUILDER_IMAGE} bash -l tools/ci/build_metal_examples.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bare-metal_examples | ||
path: ./dist/*.xe |
Oops, something went wrong.