language: cpp

os: linux

dist: jammy

addons:
  apt:
    packages:
      - cmake
      - make
      - bison
      - flex
      - ronn
      - tar
      - diffutils
      - fuse3
      - pkg-config
      - binutils-dev
      - libarchive-dev
      - libbenchmark-dev
      - libboost-context-dev
      - libboost-filesystem-dev
      - libboost-program-options-dev
      - libboost-python-dev
      - libboost-regex-dev
      - libboost-system-dev
      - libboost-thread-dev
      - libbrotli-dev
      - libevent-dev
      - libjemalloc-dev
      - libdouble-conversion-dev
      - libiberty-dev
      - liblz4-dev
      - liblzma-dev
      - libssl-dev
      - libunwind-dev
      - libdwarf-dev
      - libelf-dev
      - libfmt-dev
      - libfuse3-dev
      - libgoogle-glog-dev

cache: ccache

git:
  depth: false

branches:
  only:
  - main
  - wip

compiler:
  - gcc

before_script:
  - mkdir build
  - cd build
  - ccache --set-config=compiler_check=content
  - ccache --set-config=max_size=1G
  - ccache --set-config=compression=true
  - ccache --set-config=compression_level=3
  - ccache -p
  - ccache -s
  - cmake -DWITH_TESTS=1 -DWITH_BENCHMARKS=1 -DWITH_LEGACY_FUSE=1 -DWITH_MAN_PAGES=0 ..

script:
  - make -j$(nproc)
  - make test
  - ccache -s
