ognibuild 0.2.11

Detect and run any build system
Documentation
---
name: Rust

on:
  push:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  rust:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ['ubuntu-latest', macos-latest]
      fail-fast: false

    steps:
      - uses: actions/checkout@v6
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: "3.x"
      - name: Update apt cache
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get update
      - name: Install Debian tools on Ubuntu
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get install -y mmdebstrap
      - name: Install system breezy and libapt-pkg-dev
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get install -y brz libapt-pkg-dev libpcre3-dev
      - name: Install breezy
        run: pip install breezy
      - name: Install breezy and brz-debian
        run: pip install \
            git+https://github.com/breezy-team/breezy-debian \
            python_apt@git+https://salsa.debian.org/apt-team/python-apt
        if: matrix.os == 'ubuntu-latest'
      - name: Build
        run: cargo build --verbose
      - name: Run tests
        # Exclude debian features:
        run: cargo test --verbose --no-default-features --features=breezy,dep-server,upstream
        if: matrix.os != 'ubuntu-latest'
      - name: Run tests
        run: cargo test --verbose
        if: matrix.os == 'ubuntu-latest'
      - name: Run tests (with Debian feature)
        run: cargo test --verbose --features=debian
        if: matrix.os == 'ubuntu-latest'