| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ "*" ] |
| 6 |
pull_request: |
| 7 |
branches: [ main ] |
| 8 |
schedule: |
| 9 |
|
| 10 |
- cron: '30 4 * * 6' |
| 11 |
|
| 12 |
env: |
| 13 |
CARGO_TERM_COLOR: always |
| 14 |
|
| 15 |
jobs: |
| 16 |
build: |
| 17 |
|
| 18 |
runs-on: ${{ matrix.os }} |
| 19 |
strategy: |
| 20 |
fail-fast: false |
| 21 |
matrix: |
| 22 |
os: [ubuntu-22.04, macos-12, ubuntu-20.04, macos-11, ubuntu-18.04] |
| 23 |
|
| 24 |
steps: |
| 25 |
- name: Checkout |
| 26 |
uses: actions/checkout@v3 |
| 27 |
- name: Update Rust Toolchain |
| 28 |
run: rustup update |
| 29 |
- name: Install dependencies (macOS) |
| 30 |
run: brew install shunit2 shellcheck shfmt |
| 31 |
if: runner.os == 'macOS' |
| 32 |
- name: Install dependencies (Linux) |
| 33 |
run: | |
| 34 |
sudo apt-get update |
| 35 |
sudo apt-get -y install libacl1-dev acl shunit2 valgrind shellcheck |
| 36 |
if: runner.os == 'Linux' |
| 37 |
- name: Fetch |
| 38 |
run: cargo fetch |
| 39 |
- name: Build (no-serde) |
| 40 |
run: cargo build |
| 41 |
- name: Build (serde) |
| 42 |
run: cargo build --features serde |
| 43 |
- name: Unit Test (no-serde) |
| 44 |
run: cargo test |
| 45 |
- name: Unit Test (serde) |
| 46 |
run: cargo test --features serde |
| 47 |
- name: Run integration tests |
| 48 |
run: ./tests/run_tests.sh |
| 49 |
- name: Run memory tests (Linux) |
| 50 |
run: ./tests/run_tests.sh memcheck |
| 51 |
if: runner.os == 'Linux' && matrix.os != 'ubuntu-18.04' |
| 52 |
- name: Code coverage |
| 53 |
run: ./ci/coverage.sh codecov |
| 54 |
- name: Lint Check |
| 55 |
run: ./ci/lint.sh |
| 56 |
- name: Format Check |
| 57 |
run: ./ci/format.sh |
| 58 |
- name: Docs Check |
| 59 |
run: ./ci/docs.sh |
| 60 |
- name: Bindgen Check |
| 61 |
run: ./ci/bindgen.sh |