Browse Source

Build Android example as part of CI.

master
Nolan Darilek 2 months ago
parent
commit
a01fd93502
  1. 21
      .github/workflows/test.yml
  2. 8
      Makefile.toml
  3. 3
      examples/android/src/lib.rs

21
.github/workflows/test.yml

@ -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/[email protected]
- uses: Swatinem/[email protected]
- uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
- uses: actions-rs/[email protected]
with:
crate: cargo-make
use-tool-cache: true
- uses: actions-rs/[email protected]
with:
command: make
args: build-android-example

8
Makefile.toml

@ -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",

3
examples/android/src/lib.rs

@ -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 {

Loading…
Cancel
Save