1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-21 21:59:37 +00:00

Build Android example as part of CI.

This commit is contained in:
Nolan Darilek 2020-12-30 12:28:07 -06:00
parent 8d6f40b1a5
commit a01fd93502
3 changed files with 31 additions and 1 deletions

View File

@ -60,3 +60,24 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --target wasm32-unknown-unknown
check_android:
name: Check Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
- uses: actions-rs/install@v0.1
with:
crate: cargo-make
use-tool-cache: true
- uses: actions-rs/cargo@v1
with:
command: make
args: build-android-example

View File

@ -1,4 +1,10 @@
[tasks.run-android]
[tasks.build-android-example]
script = [
"cd examples/android",
"./gradlew assembleDebug",
]
[tasks.run-android-example]
script = [
"cd examples/android",
"./gradlew runDebug",

View File

@ -1,5 +1,8 @@
use tts::*;
// The `loop {}` below only simulates an app loop.
// Without it, the `TTS` instance gets dropped before callbacks can run.
#[allow(unreachable_code)]
fn run() -> Result<(), Error> {
let mut tts = TTS::default()?;
let Features {