mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-15 09:59:38 +00:00
118 lines
3.3 KiB
YAML
118 lines
3.3 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-22.04, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: sudo apt-get update; sudo apt-get install -y libspeechd-dev
|
|
if: ${{ runner.os == 'Linux' }}
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --examples
|
|
if: ${{ runner.os != 'Linux' }}
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --no-default-features --examples
|
|
if: ${{ runner.os == 'Linux' }}
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all --check
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
if: ${{ runner.os != 'Linux' }}
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --no-default-features
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
check_web:
|
|
name: Check Web
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
target: wasm32-unknown-unknown
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --examples --target wasm32-unknown-unknown
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all --check
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features --target wasm32-unknown-unknown
|
|
|
|
check_android:
|
|
name: Check Android
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
override: true
|
|
- uses: actions-rs/install@v0.1
|
|
with:
|
|
crate: cargo-apk
|
|
# use-tool-cache: true
|
|
- run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: apk
|
|
args: build
|
|
|
|
check_web_example:
|
|
name: Check Web Example
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
target: wasm32-unknown-unknown
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt, clippy
|
|
override: true
|
|
- uses: actions-rs/install@v0.1
|
|
with:
|
|
crate: cargo-make
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: make
|
|
args: build-web-example
|