1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-23 03:39:38 +00:00

Add caching to builds, and remove unneeded LLVM install.

This commit is contained in:
Nolan Darilek 2020-11-17 13:15:37 -06:00
parent 3500e88117
commit 10010f9bc9
2 changed files with 102 additions and 91 deletions

View File

@ -1,91 +1,97 @@
name: Release name: Release
on: on:
push: push:
tags: tags:
- "v*" - "v*"
jobs: jobs:
build_linux: build_linux:
name: Build Linux name: Build Linux
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: | - uses: Swatinem/rust-cache@v1
sudo apt-get update - run: |
sudo apt-get install -y libspeechd-dev sudo apt-get update
rustup update sudo apt-get install -y libspeechd-dev
cargo check --examples --release rustup update
rustup target add wasm32-unknown-unknown cargo check --examples --release
cargo check --examples --release --target wasm32-unknown-unknown rustup target add wasm32-unknown-unknown
cargo check --examples --release --target wasm32-unknown-unknown
build_web:
name: Build Web build_web:
runs-on: ubuntu-latest name: Build Web
steps: runs-on: ubuntu-latest
- uses: actions/checkout@v2 steps:
- run: | - uses: actions/checkout@v2
rustup update - uses: Swatinem/rust-cache@v1
rustup target add wasm32-unknown-unknown - run: |
cargo check --examples --release --target wasm32-unknown-unknown rustup update
rustup target add wasm32-unknown-unknown
build_windows: cargo check --examples --release --target wasm32-unknown-unknown
name: Build Windows
runs-on: windows-latest build_windows:
steps: name: Build Windows
- uses: actions/checkout@v2 runs-on: windows-latest
- run: | steps:
choco install -y llvm - uses: actions/checkout@v2
rustup update - uses: Swatinem/rust-cache@v1
cargo check --examples --all-features --release - run: |
rustup update
build_macos: cargo check --examples --all-features --release
name: Build MacOS
runs-on: macos-latest build_macos:
steps: name: Build MacOS
- uses: actions/checkout@v2 runs-on: macos-latest
- run: | steps:
rustup update - uses: actions/checkout@v2
cargo check --examples --release - uses: Swatinem/rust-cache@v1
- run: |
build_ios: rustup update
name: Build iOS cargo check --examples --release
runs-on: macos-latest
steps: build_ios:
- uses: actions/checkout@v2 name: Build iOS
- run: | runs-on: macos-latest
rustup update steps:
rustup target add aarch64-apple-ios x86_64-apple-ios - uses: actions/checkout@v2
cargo install cargo-lipo - uses: Swatinem/rust-cache@v1
cargo lipo --release - run: |
rustup update
publish_winrt_bindings: rustup target add aarch64-apple-ios x86_64-apple-ios
name: Publish winrt_bindings cargo install cargo-lipo
runs-on: windows-latest cargo lipo --release
needs: [build_windows]
env: publish_winrt_bindings:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} name: Publish winrt_bindings
steps: runs-on: windows-latest
- uses: actions/checkout@v2 needs: [build_windows]
- run: | env:
choco install -y llvm CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
rustup update steps:
cargo login $CARGO_TOKEN - uses: actions/checkout@v2
cd winrt_bindings - uses: Swatinem/rust-cache@v1
cargo package - run: |
cargo publish || true choco install -y llvm
rustup update
publish: cargo login $CARGO_TOKEN
name: Publish cd winrt_bindings
runs-on: ubuntu-latest cargo package
needs: [build_linux, build_web, build_windows, build_macos, build_ios] cargo publish || true
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} publish:
steps: name: Publish
- uses: actions/checkout@v2 runs-on: ubuntu-latest
- run: | needs: [build_linux, build_web, build_windows, build_macos, build_ios]
sudo apt-get update env:
sudo apt-get install -y libspeechd-dev CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
rustup update steps:
cargo login $CARGO_TOKEN - uses: actions/checkout@v2
cargo publish - uses: Swatinem/rust-cache@v1
- run: |
sudo apt-get update
sudo apt-get install -y libspeechd-dev
rustup update
cargo login $CARGO_TOKEN
cargo publish

View File

@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: | - run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libspeechd-dev sudo apt-get install -y libspeechd-dev
@ -21,6 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: | - run: |
rustup update rustup update
rustup target add wasm32-unknown-unknown rustup target add wasm32-unknown-unknown
@ -31,6 +33,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: | - run: |
rustup update rustup update
cargo check --examples --release --all-features cargo check --examples --release --all-features
@ -40,6 +43,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: | - run: |
rustup update rustup update
cargo check --examples --release cargo check --examples --release
@ -49,6 +53,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: | - run: |
rustup update rustup update
rustup target add aarch64-apple-ios x86_64-apple-ios rustup target add aarch64-apple-ios x86_64-apple-ios