-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.19 KB
/
ci_build_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI Build
on: [push, pull_request]
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Remove MSys64 MingW64 Binaries
if: runner.os == 'Windows'
# remove this because there is a bad libclang.dll that confuses bindgen
run: Remove-Item -LiteralPath "C:\msys64\mingw64\bin" -Force -Recurse
- name: Install Dependencies
if: runner.os == 'Windows'
run: choco install llvm -y
- name: Git Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Cargo Build
run: cargo build --verbose --workspace
- name: Cargo Test
run: cargo test --verbose --workspace
# Cache the `cargo build` so future jobs can reuse build
- name: Cache cargo build
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}