Merge pull request #222 from Picovoice/retire-rpi2-bb-jetson #55
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
name: Rust | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'binding/rust/**' | |
- 'binding/rust/**/*.rs' | |
- '!binding/rust/README.md' | |
- 'lib/linux/**' | |
- 'lib/mac/**' | |
- 'lib/raspberry-pi/**' | |
- 'lib/windows/**' | |
- '.github/workflows/rust.yml' | |
pull_request: | |
branches: [ main, 'v[0-9]+.[0-9]+' ] | |
paths: | |
- 'binding/rust/**' | |
- 'binding/rust/**/*.rs' | |
- '!binding/rust/README.md' | |
- 'lib/linux/**' | |
- 'lib/mac/**' | |
- 'lib/raspberry-pi/**' | |
- 'lib/windows/**' | |
- '.github/workflows/rust.yml' | |
defaults: | |
run: | |
working-directory: binding/rust | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust dependencies | |
run: sudo apt install libasound2-dev | |
- name: Rust pre-build | |
run: ./copy.sh | |
- name: Rust build | |
run: cargo build --verbose | |
- name: Rust run tests | |
run: PV_ACCESS_KEY=${{secrets.PV_VALID_ACCESS_KEY}} cargo test --verbose |