| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
|
| 11 |
jobs: |
| 12 |
test: |
| 13 |
name: Test |
| 14 |
runs-on: ${{ matrix.os }} |
| 15 |
strategy: |
| 16 |
matrix: |
| 17 |
os: [macos-latest, ubuntu-latest, windows-latest] |
| 18 |
clang: [["14.0", "clang_14_0"]] |
| 19 |
rust: ["1.60.0"] |
| 20 |
steps: |
| 21 |
- name: Checkout Repository |
| 22 |
uses: actions/checkout@v4 |
| 23 |
|
| 24 |
- name: Install LLVM and Clang |
| 25 |
uses: KyleMayes/[email protected] |
| 26 |
with: |
| 27 |
version: ${{ matrix.clang[0] }} |
| 28 |
directory: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }} |
| 29 |
|
| 30 |
- name: Install Rust |
| 31 |
uses: dtolnay/rust-toolchain@stable |
| 32 |
with: |
| 33 |
toolchain: ${{ matrix.rust }} |
| 34 |
|
| 35 |
- name: Cargo Test (Dynamic) |
| 36 |
run: cargo test --verbose --features ${{ matrix.clang[1] }} -- --nocapture |
| 37 |
- name: Cargo Test (Runtime) |
| 38 |
run: cargo test --verbose --features "${{ matrix.clang[1] }} runtime" -- --nocapture |
| 39 |
test-bindgen: |
| 40 |
name: Test (bindgen) |
| 41 |
runs-on: ubuntu-latest |
| 42 |
steps: |
| 43 |
- name: Checkout Repository |
| 44 |
uses: actions/checkout@v4 |
| 45 |
|
| 46 |
- name: Install LLVM and Clang |
| 47 |
uses: KyleMayes/[email protected] |
| 48 |
with: |
| 49 |
version: 14 |
| 50 |
directory: ${{ runner.temp }}/llvm |
| 51 |
|
| 52 |
- name: Install Rust |
| 53 |
uses: dtolnay/rust-toolchain@stable |
| 54 |
|
| 55 |
- name: Cargo Run (bindgen-test) |
| 56 |
run: cargo run --manifest-path bindgen-test/Cargo.toml |