Skip to content

Commit

Permalink
add missing actions (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Jun 26, 2023
1 parent 6709672 commit 1262cf4
Show file tree
Hide file tree
Showing 26 changed files with 944 additions and 218 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: [ master ]
paths:
- '**/*.c'
- '.github/workflows/c-codestyle.yml'
pull_request:
branches: [ master, '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 resources/.lint/c/formatter.py -c -v
69 changes: 60 additions & 9 deletions .github/workflows/dotnet-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,85 @@ defaults:
working-directory: demo/dotnet/PicovoiceDemo

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

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: windows
- os: macos-latest
platform: mac

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup .NET
- name: Set up .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Package restore
run: dotnet restore

- name: Dotnet build micdemo
run: dotnet build -c MicDemo.Release

build-filedemo:
runs-on: ubuntu-latest
- name: Dotnet build filedemo
run: dotnet build -c FileDemo.Release

- name: Run Dotnet filedemo
run: dotnet run -c FileDemo.Release --
--input_audio_path ../../../resources/audio_samples/picovoice-coffee.wav
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--keyword_path ../../../resources/porcupine/resources/keyword_files/${{ matrix.platform }}/picovoice_${{ matrix.platform }}.ppn
--context_path ../../../resources/rhino/resources/contexts/${{ matrix.platform }}/coffee_maker_${{ matrix.platform }}.rhn

build-self-hosted:
runs-on: ${{ matrix.machine }}

strategy:
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
include:
- machine: rpi2
platform: raspberry-pi
- machine: rpi3-32
platform: raspberry-pi
- machine: rpi3-64
platform: raspberry-pi
- machine: rpi4-32
platform: raspberry-pi
- machine: rpi4-64
platform: raspberry-pi
- machine: jetson
platform: jetson
- machine: beaglebone
platform: beaglebone

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Package restore
run: dotnet restore

- name: Dotnet build micdemo
run: dotnet build -c MicDemo.Release

- name: Dotnet build filedemo
run: dotnet build -c FileDemo.Release

- name: Run Dotnet filedemo
run: dotnet run -c FileDemo.Release --
--input_audio_path ../../../resources/audio_samples/picovoice-coffee.wav
--access_key ${{secrets.PV_VALID_ACCESS_KEY}}
--keyword_path ../../../resources/porcupine/resources/keyword_files/${{ matrix.platform }}/picovoice_${{ matrix.platform }}.ppn
--context_path ../../../resources/rhino/resources/contexts/${{ matrix.platform }}/coffee_maker_${{ matrix.platform }}.rhn
83 changes: 83 additions & 0 deletions .github/workflows/flutter-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Flutter

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

defaults:
run:
working-directory: demo/flutter

jobs:
build-android:
name: Build Android demo
runs-on: ubuntu-latest
strategy:
matrix:
flutter-version: ['2.8.1', '3.0.4']

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Install Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build apk

build-ios:
name: Build iOS demo
runs-on: macos-11
strategy:
matrix:
flutter-version: ['2.8.1', '3.0.4']

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
architecture: x64

- name: Update Cocoapods repo
run: pod repo update

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build ios --release --no-codesign
62 changes: 0 additions & 62 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,6 @@ defaults:
working-directory: demo/flutter

jobs:
build-android:
name: Build Android demo
runs-on: ubuntu-latest
strategy:
matrix:
flutter-version: ['2.8.1', '3.0.4']

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Install Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build apk

test-android:
name: Test Android
runs-on: pv-android
Expand All @@ -83,36 +51,6 @@ jobs:
- name: Run integration tests
run: flutter test integration_test

build-ios:
name: Build iOS demo
runs-on: macos-11
strategy:
matrix:
flutter-version: ['2.8.1', '3.0.4']

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
architecture: x64

- name: Update Cocoapods repo
run: pod repo update

- name: Install dependencies
run: flutter pub get

- name: Prepare demo
run: dart scripts/prepare_demo.dart en

- name: Build
run: flutter build ios --release --no-codesign

test-ios:
name: Test iOS
runs-on: pv-ios
Expand Down
Loading

0 comments on commit 1262cf4

Please sign in to comment.