Skip to content

CI

CI #751

Workflow file for this run

name: CI
on:
push:
branches: [ "*" ]
schedule:
# Every Saturday at 4:30 AM UTC.
- cron: '30 4 * * 6'
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-14, macos-13, macos-12]
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Update Rust Toolchain
run: rustup update
- name: Install dependencies (macOS)
run: brew install shunit2 shellcheck shfmt
if: runner.os == 'macOS'
- name: Install dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get -y install libacl1-dev acl shunit2 shellcheck
if: runner.os == 'Linux'
- name: Fetch
run: cargo fetch
- name: Build (no-serde)
run: cargo build
- name: Build (serde)
run: cargo build --features serde
- name: Unit Test (no-serde)
run: cargo test
- name: Unit Test (serde)
run: RUST_LOG=debug cargo test --features serde
- name: Run integration tests
run: ./tests/run_tests.sh
- name: Run memory tests (Linux)
run: |
sudo NEEDRESTART_MODE=l apt-get install -y valgrind
./tests/run_tests.sh memcheck
if: runner.os == 'Linux'
- name: Run TMPFS tests (Linux)
run: |
mkdir /run/user/$UID/exacl
export TMPDIR=/run/user/$UID/exacl
RUST_LOG=debug cargo test --features serde
./tests/run_tests.sh
if: runner.os == 'Linux'
- name: Code coverage
env:
CODECOV_TOKEN: ${{ secrets.EXACL_CODECOV_TOKEN }}
run: ./ci/coverage.sh codecov
- name: Lint Check
run: ./ci/lint.sh
- name: Format Check
run: ./ci/format.sh
- name: Docs Check
run: ./ci/docs.sh
- name: Bindgen Check
run: ./ci/bindgen.sh