2020-11-17 19:15:37 +00:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
2020-11-17 22:47:46 +00:00
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-09-07 17:33:45 +00:00
|
|
|
os: [windows-latest, ubuntu-22.04, macos-latest]
|
2020-11-17 22:47:46 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-11-17 19:15:37 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
2020-11-17 22:47:46 +00:00
|
|
|
- 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
|
2022-03-10 20:14:03 +00:00
|
|
|
if: ${{ runner.os != 'Linux' }}
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features --examples
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2020-11-17 22:47:46 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
2022-03-10 20:14:03 +00:00
|
|
|
args: --all --check
|
2020-11-17 22:47:46 +00:00
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --all-features
|
2022-03-10 20:14:03 +00:00
|
|
|
if: ${{ runner.os != 'Linux' }}
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --no-default-features
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2020-11-17 19:15:37 +00:00
|
|
|
|
2020-11-17 22:47:46 +00:00
|
|
|
check_web:
|
|
|
|
name: Check Web
|
2022-09-07 17:33:45 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-17 19:15:37 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
2020-11-17 22:47:46 +00:00
|
|
|
- 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
|
2021-04-03 17:59:32 +00:00
|
|
|
- uses: actions-rs/install@v0.1
|
|
|
|
with:
|
|
|
|
crate: cargo-make
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: make
|
2021-04-05 12:45:08 +00:00
|
|
|
args: build-web-example
|
2020-11-17 19:15:37 +00:00
|
|
|
|
|
|
|
publish:
|
|
|
|
name: Publish
|
2022-09-07 17:33:45 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-17 22:47:46 +00:00
|
|
|
needs: [check, check_web]
|
2020-11-17 19:15:37 +00:00
|
|
|
env:
|
|
|
|
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
2020-11-17 22:47:46 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
target: wasm32-unknown-unknown
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2020-11-17 19:15:37 +00:00
|
|
|
- run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libspeechd-dev
|
|
|
|
cargo login $CARGO_TOKEN
|
2022-03-10 20:14:03 +00:00
|
|
|
cargo publish --no-default-features
|