2020-04-11 18:14:00 +00:00
|
|
|
name: Build
|
2020-04-11 16:53:36 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2020-11-18 01:27:40 +00:00
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-12 14:18:06 +00:00
|
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
2020-11-18 01:27:40 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-04-11 17:15:20 +00:00
|
|
|
steps:
|
2020-08-18 15:34:08 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-11-17 18:39:51 +00:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
2020-11-18 01:27:40 +00:00
|
|
|
- run: sudo apt-get update; sudo apt-get install -y libspeechd-dev
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2020-08-18 15:34:08 +00:00
|
|
|
- run: |
|
2020-11-17 18:28:08 +00:00
|
|
|
choco install -qy llvm
|
2020-11-18 04:07:55 +00:00
|
|
|
echo LIBCLANG_PATH=c:\program` files\llvm\bin >> $Env:GITHUB_ENV
|
2020-11-18 01:27:40 +00:00
|
|
|
if: ${{ runner.os == 'Windows' }}
|
|
|
|
- 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
|
|
|
|
- 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
|
2020-08-18 15:30:30 +00:00
|
|
|
|
|
|
|
build_android:
|
|
|
|
name: Build Android
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-18 15:34:08 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-08-18 15:48:04 +00:00
|
|
|
with:
|
|
|
|
lfs: true
|
2020-11-17 19:24:58 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
restore-keys: ${{ runner.os }}-gradle
|
2020-08-18 15:34:08 +00:00
|
|
|
- run: |
|
|
|
|
./gradlew assemble
|