• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  push:
5    branches:
6      - master
7  pull_request:
8    branches:
9      - master
10
11jobs:
12  ci:
13    name: CI
14    runs-on: ${{ matrix.os }}
15    strategy:
16      matrix:
17        os: [macos-latest, ubuntu-latest, windows-latest]
18        clang: [["11.0", "clang_11_0"]]
19        rust: ["1.40.0"]
20    steps:
21      - name: Checkout Repository
22        uses: actions/checkout@v2
23      # LLVM and Clang
24      - name: Cache LLVM and Clang
25        id: cache-llvm
26        uses: actions/cache@v2
27        with:
28          path: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}
29          key: ${{ matrix.os }}-llvm-${{ matrix.clang[0] }}
30      - name: Install LLVM and Clang
31        uses: KyleMayes/install-llvm-action@v1
32        with:
33          version: ${{ matrix.clang[0] }}
34          directory: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}
35          cached: ${{ steps.cache-llvm.outputs.cache-hit }}
36      # Rust
37      - name: Install Rust
38        uses: actions-rs/toolchain@v1
39        with:
40          toolchain: ${{ matrix.rust }}
41      # Test
42      - name: Cargo Test (Dynamic)
43        uses: actions-rs/cargo@v1
44        env:
45          LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/lib
46          LLVM_CONFIG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/bin/llvm-config
47        with:
48          command: test
49          args: --verbose --features ${{ matrix.clang[1] }} -- --nocapture
50      - name: Cargo Test (Runtime)
51        uses: actions-rs/cargo@v1
52        env:
53          LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/lib
54          LLVM_CONFIG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/bin/llvm-config
55        with:
56          command: test
57          args: --verbose --features "${{ matrix.clang[1] }} runtime" -- --nocapture
58