innernet/.github/workflows/rust.yml
2021-05-09 19:57:37 +09:00

50 lines
1.1 KiB
YAML

name: Rust
on:
push:
branches:
- '*'
tags-ignore:
- 'v*'
pull_request:
branches:
- '*'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Dependencies (if Ubuntu)
env:
ACCEPT_EULA: Y
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-9-dev
if: contains(runner.os, 'Linux')
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose