-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from Picovoice/v1.2-rust
V1.2 rust
- Loading branch information
Showing
13 changed files
with
614 additions
and
240 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,79 @@ | ||
name: Rust Codestyle | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/rust-codestyle.yml' | ||
- 'binding/rust/**/*.rs' | ||
- 'demo/rust/**/*.rs' | ||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- '.github/workflows/rust-codestyle.yml' | ||
- 'binding/rust/**/*.rs' | ||
- 'demo/rust/**/*.rs' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
check-rust-binding-codestyle: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: binding/rust | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Rust pre-build | ||
run: bash copy.sh | ||
|
||
- name: Rust dependencies | ||
run: sudo apt install libasound2-dev -y | ||
|
||
- name: Rust pre-build | ||
run: bash copy.sh | ||
working-directory: binding/rust | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run clippy | ||
run: cargo clippy -- -D warnings | ||
|
||
check-rust-demo-codestyle: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: demo/rust | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Rust dependencies | ||
run: sudo apt install libasound2-dev -y | ||
|
||
- name: Rust pre-build | ||
run: bash copy.sh | ||
working-directory: binding/rust | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run clippy | ||
run: cargo clippy -- -D warnings |
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,81 @@ | ||
name: Rust Demos | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/rust-demos.yml' | ||
- 'demo/rust/**' | ||
- '!demo/rust/README.md' | ||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- '.github/workflows/rust-demos.yml' | ||
- 'demo/rust/**' | ||
- '!demo/rust/README.md' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
defaults: | ||
run: | ||
working-directory: demo/rust | ||
|
||
jobs: | ||
build-github-hosted: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Rust dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt install libasound2-dev -y | ||
|
||
- name: Rust pre-build | ||
run: bash copy.sh | ||
working-directory: binding/rust | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Rust build demo | ||
run: cargo build --verbose | ||
|
||
- name: Test | ||
run: cargo run --release -- --show_audio_devices | ||
|
||
build-self-hosted: | ||
runs-on: ${{ matrix.machine }} | ||
|
||
strategy: | ||
matrix: | ||
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, beaglebone, jetson] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Rust pre-build | ||
run: bash copy.sh | ||
working-directory: binding/rust | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Rust build demo | ||
run: cargo build --verbose | ||
|
||
- name: Test | ||
run: cargo run --release -- --show_audio_devices |
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
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
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
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
Oops, something went wrong.