Skip to content

Commit

Permalink
add missing actions (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Jul 24, 2023
1 parent cc692ef commit f13201c
Show file tree
Hide file tree
Showing 40 changed files with 1,216 additions and 253 deletions.
88 changes: 88 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
Cpp11BracedListStyle: true
AccessModifierOffset: -4
AlignConsecutiveMacros: true
AlignTrailingComments: false
AlignAfterOpenBracket: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlignArrayOfStructures: Left
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterExternBlock: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
# BraceBreakingStyle: Attach
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CommentPragmas: '^[^ ]'
CompactNamespaces: false
ContinuationIndentWidth: 8
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
InsertTrailingCommas: Wrapped
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
32 changes: 32 additions & 0 deletions .github/workflows/c-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: C Codestyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**/*.c'
- '.github/workflows/c-codestyle.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '**/*.c'
- '.github/workflows/c-codestyle.yml'

jobs:
check-c-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: sudo apt install clang-format

- name: Check c codestyle
run: python3 res/.lint/c/formatter.py -c -v
52 changes: 52 additions & 0 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: iOS Demos

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'demo/ios/OctopusDemo/**'
- '.github/workflows/ios-demos.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- 'demo/ios/OctopusDemo/**'
- '.github/workflows/ios-demos.yml'

defaults:
run:
working-directory: demo/ios/OctopusDemo

jobs:
build:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install Cocoapods
run: gem install cocoapods

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: Make build dir
run: mkdir ddp

- name: Run Cocoapods
run: pod install

- name: Build
run: xcrun xcodebuild build
-configuration Debug
-workspace OctopusDemo.xcworkspace
-sdk iphoneos
-scheme OctopusDemo
-derivedDataPath ddp
CODE_SIGNING_ALLOWED=NO
28 changes: 28 additions & 0 deletions .github/workflows/java-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Java CodeStyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**/*.java'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '**/*.java'

jobs:
check-java-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Check Java CodeStyle
run: java -Dconfig_loc=res/.lint/java/ -jar res/.lint/java/checkstyle-10.5.0-all.jar -c res/.lint/java/checkstyle.xml binding/android/ binding/java/ binding/flutter/android/ binding/react-native/android/ demo/android/ demo/java/
32 changes: 32 additions & 0 deletions .github/workflows/python-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python Codestyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'binding/python/*.py'
- 'demo/python/*.py'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- 'binding/python/*.py'
- 'demo/python/*.py'

jobs:
check-python-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: pip install flake8 pep8-naming

- name: Check python codestyle
run: flake8 --ignore=F401,F403,F405 --max-line-length=120 binding/python demo/python
46 changes: 46 additions & 0 deletions .github/workflows/python-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Python Demos

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/python-demos.yml'
- 'demo/python/**'
- '!demo/python/README.md'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python-demos.yml'
- 'demo/python/**'
- '!demo/python/README.md'

defaults:
run:
working-directory: demo/python

jobs:
build-github-hosted:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Pre-build dependencies
run: python -m pip install --upgrade pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Test
run: python octopus_demo.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --audio_paths ../../res/audio/multiple_keywords.wav --search_phrase porcupine
2 changes: 1 addition & 1 deletion .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
run: npm install -g cspell

- name: Run CSpell
run: cspell --config res/spell-check/.cspell.json "**/*"
run: cspell --config res/.lint/spell-check/.cspell.json "**/*"
24 changes: 24 additions & 0 deletions .github/workflows/swift-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Swift Codestyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**/*.swift'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '**/*.swift'

jobs:
check-switch-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Check swift codestyle
uses: norio-nomura/[email protected]
with:
args: lint --config res/.lint/swift/.swiftlint.yml --strict
35 changes: 35 additions & 0 deletions .github/workflows/web-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Web Codestyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**/web/*.js'
- '**/web/*.ts'
- '.github/workflows/web-codestyle.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '**/web/*.js'
- '**/web/*.ts'
- '.github/workflows/web-codestyle.yml'

jobs:
check-web-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Pre-build dependencies
run: npm install yarn

- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/web
Loading

0 comments on commit f13201c

Please sign in to comment.