Skip to content

Commit 6bff543

Browse files
authored
v3.0 (#496)
1 parent 8b1a2ec commit 6bff543

File tree

219 files changed

+4199
-2197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+4199
-2197
lines changed

.github/workflows/android-browserstack.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
- name: Inject AccessKey
5151
run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties
5252

53+
- name: Inject Device
54+
run: echo pvTestingDevice="cpu:1" >> local.properties
55+
5356
- name: Inject Android keystore variables
5457
run: |
5558
echo storePassword="${{secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD}}" >> local.properties
@@ -105,6 +108,9 @@ jobs:
105108
- name: Inject AccessKey
106109
run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties
107110

111+
- name: Inject Device
112+
run: echo pvTestingDevice="cpu:1" >> local.properties
113+
108114
- name: Inject Android keystore variables
109115
run: |
110116
echo storePassword="${{secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD}}" >> local.properties
@@ -133,4 +139,3 @@ jobs:
133139
--devices "android-min-max"
134140
--app_path "leopard-test-app/build/outputs/apk/en/release/leopard-test-app-en-release.apk"
135141
--test_path "leopard-test-app/build/outputs/apk/androidTest/en/release/leopard-test-app-en-release-androidTest.apk"
136-

.github/workflows/android-perf.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
- name: Inject AccessKey
5757
run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties
5858

59+
- name: Inject Device
60+
run: echo pvTestingDevice="cpu:1" >> local.properties
61+
5962
- name: Inject Android keystore variables
6063
run: |
6164
echo storePassword="${{secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD}}" >> local.properties

.github/workflows/c-demos.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141

4242
strategy:
4343
matrix:
44-
os: [ubuntu-latest, windows-latest, macos-latest]
44+
device: [ cpu, cpu:1 ]
45+
os: [ ubuntu-latest, windows-latest, macos-latest ]
4546
include:
4647
- os: ubuntu-latest
4748
platform: linux
@@ -76,15 +77,16 @@ jobs:
7677
run: pip install -r test/requirements.txt
7778

7879
- name: Test
79-
run: python test/test_leopard_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ${{ matrix.platform }} ${{ matrix.arch }}
80+
run: python test/test_leopard_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ${{ matrix.device }} ${{ matrix.platform }} ${{ matrix.arch }}
8081

8182
build-demo-self-hosted:
8283
runs-on: ${{ matrix.machine }}
8384

8485
strategy:
8586
matrix:
86-
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
87-
make_file: ["Unix Makefiles"]
87+
device: [ best ]
88+
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64 ]
89+
make_file: [ "Unix Makefiles" ]
8890
include:
8991
- machine: rpi3-32
9092
platform: raspberry-pi
@@ -101,10 +103,26 @@ jobs:
101103
- machine: rpi5-64
102104
platform: raspberry-pi
103105
arch: cortex-a76-aarch64
104-
- machine: pv-windows-arm64
106+
- device: best
107+
machine: pv-windows-arm64
105108
platform: windows
106109
arch: arm64
107110
make_file: "MinGW Makefiles"
111+
- device: gpu
112+
machine: pv-linux
113+
platform: linux
114+
arch: x86_64
115+
make_file: "Unix Makefiles"
116+
- device: gpu
117+
machine: pv-windows
118+
platform: windows
119+
arch: amd64
120+
make_file: "MinGW Makefiles"
121+
- device: gpu
122+
machine: pv-ios
123+
platform: mac
124+
arch: arm64
125+
make_file: "Unix Makefiles"
108126

109127
steps:
110128
- uses: actions/checkout@v3
@@ -121,4 +139,4 @@ jobs:
121139
run: pip install -r test/requirements.txt
122140

123141
- name: Test
124-
run: python3 test/test_leopard_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ${{ matrix.platform }} ${{ matrix.arch }}
142+
run: python3 test/test_leopard_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ${{ matrix.device }} ${{ matrix.platform }} ${{ matrix.arch }}

.github/workflows/dotnet-demos.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
os: [ubuntu-latest, windows-latest, macos-latest]
28+
device: [ cpu, cpu:1 ]
29+
os: [ ubuntu-latest, windows-latest, macos-latest ]
2930

3031
steps:
3132
- uses: actions/checkout@v3
@@ -45,14 +46,22 @@ jobs:
4546
run: dotnet build -c FileDemo.Release
4647

4748
- name: Run Dotnet filedemo
48-
run: dotnet run -c FileDemo.Release -- --input_audio_path ../../../resources/audio_samples/test.wav --access_key ${{secrets.PV_VALID_ACCESS_KEY}}
49+
run: dotnet run -c FileDemo.Release -- --input_audio_path ../../../resources/audio_samples/test.wav --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --device ${{ matrix.device }}
4950

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

5354
strategy:
5455
matrix:
55-
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-windows-arm64]
56+
device: [ best ]
57+
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-windows-arm64 ]
58+
include:
59+
- device: gpu
60+
machine: pv-linux
61+
- device: gpu
62+
machine: pv-windows
63+
- device: gpu
64+
machine: pv-ios
5665

5766
steps:
5867
- uses: actions/checkout@v3
@@ -67,4 +76,4 @@ jobs:
6776
run: dotnet build -c FileDemo.Release
6877

6978
- name: Run Dotnet filedemo
70-
run: dotnet run -c FileDemo.Release -- --input_audio_path ../../../resources/audio_samples/test.wav --access_key ${{secrets.PV_VALID_ACCESS_KEY}}
79+
run: dotnet run -c FileDemo.Release -- --input_audio_path ../../../resources/audio_samples/test.wav --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --device ${{ matrix.device }}

.github/workflows/dotnet.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -41,53 +41,34 @@ jobs:
4141

4242
strategy:
4343
matrix:
44-
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
45-
dotnet-version: [2.1.818, 3.0.103, 3.1.426, 5.0.408, 6.0.x, 8.0.x]
44+
os: [ ubuntu-latest, macos-latest, macos-15-intel, windows-latest ]
45+
device: [ cpu, cpu:1 ]
46+
dotnet-version: [ 2.1.x, 3.1.x, 6.0.x, 8.0.x, 10.0.x ]
4647
include:
47-
- dotnet-version: 2.1.818
48-
binding-framework: netstandard2.0
48+
- dotnet-version: 2.1.x
4949
test-framework: netcoreapp2.1
50-
- dotnet-version: 3.0.103
51-
binding-framework: netcoreapp3.0
52-
test-framework: netcoreapp3.0
53-
- dotnet-version: 3.1.426
54-
binding-framework: netcoreapp3.0
50+
- dotnet-version: 3.1.x
5551
test-framework: netcoreapp3.1
56-
- dotnet-version: 5.0.408
57-
binding-framework: netcoreapp3.0
58-
test-framework: net5.0
5952
- dotnet-version: 6.0.x
60-
binding-framework: net6.0
6153
test-framework: net6.0
6254
- dotnet-version: 8.0.x
63-
binding-framework: net8.0
6455
test-framework: net8.0
56+
- dotnet-version: 10.0.x
57+
test-framework: net10.0
6558
exclude:
6659
- os: ubuntu-latest
67-
dotnet-version: 2.1.818
60+
dotnet-version: 2.1.x
6861
- os: ubuntu-latest
69-
dotnet-version: 3.0.103
70-
- os: ubuntu-latest
71-
dotnet-version: 3.1.426
72-
- os: ubuntu-latest
73-
dotnet-version: 5.0.408
74-
- os: macos-latest
75-
dotnet-version: 2.1.818
76-
- os: macos-latest
77-
dotnet-version: 3.0.103
78-
- os: macos-latest
79-
dotnet-version: 3.1.426
62+
dotnet-version: 3.1.x
8063
- os: macos-latest
81-
dotnet-version: 5.0.408
64+
dotnet-version: 2.1.x
8265
- os: macos-latest
83-
dotnet-version: 6.0.x
84-
- os: macos-13
85-
dotnet-version: 8.0.x
66+
dotnet-version: 3.1.x
8667

8768
steps:
8869
- uses: actions/checkout@v3
8970

90-
- name: Setup .NET
71+
- name: Set up .NET
9172
uses: actions/setup-dotnet@v3
9273
with:
9374
dotnet-version: ${{ matrix.dotnet-version }}
@@ -99,10 +80,24 @@ jobs:
9980
dotnet-version: 8.0.x
10081

10182
- name: Build binding
102-
run: dotnet build Leopard/Leopard.csproj --framework ${{ matrix.binding-framework }} -v n
83+
run: dotnet build Leopard/Leopard.csproj
84+
85+
- name: Set test framework version (linux)
86+
if: ${{ matrix.os == 'ubuntu-latest' }}
87+
run: sed -i 's/net6.0/${{matrix.test-framework}}/g' LeopardTest/LeopardTest.csproj
88+
89+
- name: Set test framework version (macos)
90+
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel' }}
91+
run: sed -i '.bak' 's/net6.0/${{matrix.test-framework}}/g' LeopardTest/LeopardTest.csproj
92+
93+
- name: Set test framework version (windows)
94+
if: ${{ matrix.os == 'windows-latest' }}
95+
run: (Get-Content -Path "LeopardTest/LeopardTest.csproj") -replace "net6.0", "${{matrix.test-framework}}" | Set-Content -Path "LeopardTest/LeopardTest.csproj"
10396

10497
- name: Test
105-
run: dotnet test --framework ${{ matrix.test-framework }} -v n
98+
run: dotnet test -v n
99+
env:
100+
DEVICE: ${{ matrix.device }}
106101

107102
build-self-hosted:
108103
runs-on: ${{ matrix.machine }}
@@ -111,13 +106,24 @@ jobs:
111106

112107
strategy:
113108
matrix:
114-
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
109+
device: [ best ]
110+
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-windows-arm64 ]
111+
include:
112+
- device: gpu
113+
machine: pv-linux
114+
- device: gpu
115+
machine: pv-windows
116+
- device: gpu
117+
machine: pv-ios
115118

116119
steps:
117120
- uses: actions/checkout@v3
118121

119122
- name: Build binding
120-
run: dotnet build Leopard/Leopard.csproj --framework net8.0 -v n
123+
run: dotnet build Leopard/Leopard.csproj
121124

122125
- name: Test
123-
run: dotnet test --framework net8.0 -v n
126+
run: dotnet test -v n
127+
env:
128+
DEVICE: ${{ matrix.device }}
129+
DOTNET_ROLL_FORWARD: LatestMajor

.github/workflows/flutter.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ jobs:
3232
- name: Copy test_resources
3333
run: ./copy_test_resources.sh
3434

35-
- name: Inject AppID
35+
- name: Inject AccessKey
3636
run: sed -i 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
3737
integration_test/app_test.dart
3838

39+
- name: Inject device
40+
run: sed -i 's:{TESTING_DEVICE_HERE}:cpu\:1:'
41+
integration_test/app_test.dart
42+
3943
- name: Install Flutter 3.35.0
4044
run: |
4145
fvm install 3.35.0
@@ -60,10 +64,14 @@ jobs:
6064
- name: Copy test_resources
6165
run: ./copy_test_resources.sh
6266

63-
- name: Inject AppID
67+
- name: Inject AccessKey
6468
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
6569
integration_test/app_test.dart
6670

71+
- name: Inject Device
72+
run: sed -i '.bak' 's:{TESTING_DEVICE_HERE}:cpu\:1:'
73+
integration_test/app_test.dart
74+
6775
- name: Install Flutter 3.35.0
6876
run: |
6977
fvm install 3.35.0

.github/workflows/ios-browserstack.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
4444
LeopardAppTestUITests/LeopardAppTestUITests.swift
4545

46+
- name: Inject Device
47+
run: sed -i '.bak' 's:{TESTING_DEVICE_HERE}:cpu\:1:'
48+
LeopardAppTestUITests/LeopardAppTestUITests.swift
49+
4650
- name: XCode Build
4751
run: xcrun xcodebuild build-for-testing
4852
-configuration Debug

.github/workflows/ios-perf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ jobs:
5353
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
5454
PerformanceTest/PerformanceTest.swift
5555

56+
- name: Inject Device
57+
run: sed -i '.bak' 's:{TESTING_DEVICE_HERE}:cpu\:1:'
58+
PerformanceTest/PerformanceTest.swift
59+
5660
- name: Inject Number of Iterations
5761
run: sed -i '.bak' 's:{NUM_TEST_ITERATIONS}:30:'
5862
PerformanceTest/PerformanceTest.swift

.github/workflows/java-demos.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ jobs:
2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest, windows-latest, macos-latest]
29-
java-version: [11, 17, 21]
29+
device: [cpu, cpu:1]
30+
java-version: [11, 17, 21, 25]
3031
include:
3132
- java-version: 11
3233
gradle-version: 6.5
3334
- java-version: 17
3435
gradle-version: 7.3
3536
- java-version: 21
3637
gradle-version: 8.5
38+
- java-version: 25
39+
gradle-version: 9.2.1
3740

3841
steps:
3942
- uses: actions/checkout@v3
@@ -53,14 +56,22 @@ jobs:
5356
run: gradle build
5457

5558
- name: Run filedemo
56-
run: java -jar build/libs/leopard-file-demo.jar -a ${{secrets.PV_VALID_ACCESS_KEY}} -i ../../resources/audio_samples/test.wav
59+
run: java -jar build/libs/leopard-file-demo.jar -a ${{ secrets.PV_VALID_ACCESS_KEY }} -i ../../resources/audio_samples/test.wav -y ${{ matrix.device }}
5760

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

6164
strategy:
6265
matrix:
66+
device: [best]
6367
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
68+
include:
69+
- device: gpu
70+
machine: pv-linux
71+
- device: gpu
72+
machine: pv-windows
73+
- device: gpu
74+
machine: pv-ios
6475

6576
steps:
6677
- uses: actions/checkout@v3
@@ -69,4 +80,4 @@ jobs:
6980
run: ./gradlew build
7081

7182
- name: Run filedemo
72-
run: java -jar build/libs/leopard-file-demo.jar -a ${{secrets.PV_VALID_ACCESS_KEY}} -i ../../resources/audio_samples/test.wav
83+
run: java -jar build/libs/leopard-file-demo.jar -a ${{ secrets.PV_VALID_ACCESS_KEY }} -i ../../resources/audio_samples/test.wav -y ${{ matrix.device }}

.github/workflows/java-perf.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: ./gradlew assemble
5454

5555
- name: Test
56-
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="50" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"
56+
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DpvTestingDevice="cpu:1" -DnumTestIterations="50" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"
5757

5858
perf-self-hosted:
5959
runs-on: ${{ matrix.machine }}
@@ -90,7 +90,7 @@ jobs:
9090
run: bash machine-state.sh
9191

9292
- name: Test
93-
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="20" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"
93+
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DpvTestingDevice="cpu:1" -DnumTestIterations="20" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"
9494

9595
- name: Machine state after
9696
working-directory: resources/scripts
@@ -115,4 +115,4 @@ jobs:
115115
run: ./gradlew assemble
116116

117117
- name: Test
118-
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="20" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"
118+
run: ./gradlew test --info --tests LeopardPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DpvTestingDevice="cpu:1" -DnumTestIterations="20" -DinitPerformanceThresholdSec="${{matrix.init_performance_threshold_sec}}" -DprocPerformanceThresholdSec="${{matrix.proc_performance_threshold_sec}}"

0 commit comments

Comments
 (0)