Switch to Rust GitHub actions.

This commit is contained in:
Nolan Darilek 2020-11-17 19:27:40 -06:00
parent e2c162c547
commit b34c880a36

View File

@ -2,57 +2,42 @@ name: Build
on: on:
push: push:
branches: [master]
pull_request: pull_request:
branches: [master]
jobs: jobs:
build_linux: check:
name: Build Linux name: Check
runs-on: ubuntu-latest strategy:
steps: matrix:
- uses: actions/checkout@v2 os: [windows-latest, ubuntu-latest, macos-latest]
- uses: Swatinem/rust-cache@v1 runs-on: ${{ matrix.os }}
- run: |
sudo apt-get update
sudo apt-get install -y libspeechd-dev
rustup update
cargo check --release
build_windows:
name: Build Windows
runs-on: windows-latest
env:
LIBCLANG_PATH: c:\program files\llvm\bin
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- run: sudo apt-get update; sudo apt-get install -y libspeechd-dev
if: ${{ runner.os == 'Linux' }}
- run: | - run: |
choco install -qy llvm choco install -qy llvm
rustup update echo "LIBCLANG_PATH=c:\program files\llvm\bin" >> $GITHUB_ENV
cargo check --release --all-features if: ${{ runner.os == 'Windows' }}
- uses: actions-rs/toolchain@v1
build_macos: with:
name: Build MacOS profile: minimal
runs-on: macos-latest toolchain: stable
steps: components: rustfmt, clippy
- uses: actions/checkout@v2 override: true
- uses: Swatinem/rust-cache@v1 - uses: actions-rs/cargo@v1
- run: | with:
rustup update command: check
cargo check --release args: --all-features --examples
- uses: actions-rs/cargo@v1
build_ios: with:
name: Build iOS command: fmt
runs-on: macos-latest args: --all -- --check
steps: - uses: actions-rs/clippy-check@v1
- uses: actions/checkout@v2 with:
- uses: Swatinem/rust-cache@v1 token: ${{ secrets.GITHUB_TOKEN }}
- run: | args: --all-features
rustup update
rustup target add aarch64-apple-ios x86_64-apple-ios
cargo install cargo-lipo
cargo lipo --release
build_android: build_android:
name: Build Android name: Build Android