libversion-sys 0.1.0

FFI bindings to libversion, an advanced version string comparison library
Documentation
name: CI
on:
  push:
  pull_request:
  schedule:
    - cron: "0 0 1 * *"
jobs:
  build:
    strategy:
      matrix:
        include:
          - { os: ubuntu-22.04, cc: gcc, cxx: g++ }
          - { os: ubuntu-22.04, cc: clang, cxx: clang++, features: asan }
          - { os: ubuntu-22.04, cc: clang, cxx: clang++, features: exttests }
          - { os: ubuntu-latest, cc: gcc, cxx: g++ }
          - { os: ubuntu-latest, cc: clang, cxx: clang++, features: asan }
          - { os: ubuntu-latest, cc: clang, cxx: clang++, features: exttests }
      fail-fast: false
    runs-on: ${{ matrix.os }}
    name: ${{ matrix.os }} ${{ matrix.cc }} ${{ matrix.features }}
    steps:
      - uses: actions/checkout@v5
      - name: Set up environment
        run: |
          echo 'CC=${{ matrix.cc }}' >> $GITHUB_ENV
          echo 'CXX=${{ matrix.cxx }}' >> $GITHUB_ENV
          echo 'CFLAGS=-Werror -Wall -Wextra -pedantic' >> $GITHUB_ENV
          echo 'CXXFLAGS=-Werror -Wall -Wextra -pedantic' >> $GITHUB_ENV
      - name: Set up asan
        if: ${{ contains(matrix.features, 'asan') }}
        run: |
          echo "CFLAGS=$CFLAGS -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize-recover=all" >> $GITHUB_ENV
          echo "CXXFLAGS=$CXXFLAGS -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize-recover=all" >> $GITHUB_ENV
          echo "LDFLAGS=$LDFLAGS -fsanitize=address,undefined,integer" >> $GITHUB_ENV
      - name: Configure
        run: cmake . -DCMAKE_VERBOSE_MAKEFILE=yes -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
      - name: Build
        run: cmake --build .
      - name: Run tests
        run: ctest -V
      - name: Install
        run: sudo make install
      - name: Check for library usability for clients
        if: ${{ contains(matrix.features, 'exttests') }}
        run: |
          for exttest in exttests/*; do
            (
              echo "Running exttest $exttest..."
              cd $exttest
              if [ -e CMakeLists.txt ]; then
                cmake . >/dev/null 2>&1 || cmake .
              fi
              make >/dev/null 2>&1 || make
            )
          done