-
Notifications
You must be signed in to change notification settings - Fork 43
57 lines (55 loc) · 1.74 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ci:
name: CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
clang: [["10.0", "clang_10_0"]]
rust: ["1.40.0"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# LLVM and Clang
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}
key: ${{ matrix.os }}-llvm-${{ matrix.clang[0] }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ matrix.clang[0] }}
directory: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
# Rust
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
# Test
- name: Cargo Test (Dynamic)
uses: actions-rs/cargo@v1
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/lib
LLVM_CONFIG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/bin/llvm-config
with:
command: test
args: --verbose --features ${{ matrix.clang[1] }} -- --nocapture
- name: Cargo Test (Runtime)
uses: actions-rs/cargo@v1
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/lib
LLVM_CONFIG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/bin/llvm-config
with:
command: test
args: --verbose --features "${{ matrix.clang[1] }} runtime" -- --nocapture