Skip to content

fix github workflow #34

fix github workflow

fix github workflow #34

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable]
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/llvm
key: llvm-11.0
if: matrix.os == 'windows-latest'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
if: matrix.os == 'windows-latest'
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- name: Verify versions
run: rustc --version && rustup --version && cargo --version
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
export ASAN_OPTIONS=verify_asan_link_order=0
fi
shell: bash
- name: Cargo Build
run: cargo build --verbose
- name: Build examples
run: cargo build --examples
- name: Run tests
run: cargo test --verbose --all -- --test-threads=1
- name: Check code style
run: cargo fmt -- --check