---
name: 'Build & Test'
on:
  push:
    branches:
      - master
      - 'fuse-[0-9]+.[0-9]+*'  # This will match branches like 3.17, 3.18, 4.0, etc.
  pull_request:
    branches:
      - master
      - 'fuse-[0-9]+.[0-9]+*'

permissions:
  contents: read

jobs:
  build:
    runs-on: '${{ matrix.os }}'
    strategy:
      matrix:
        os:
          # 18.04 does not work because of ‘no_sanitize’ attribute
          # cc1: all warnings being treated as errors
          # - ubuntu-18.04
          - ubuntu-latest
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
        with:
          python-version: '3.x'
      - name: Install dependencies (Ubuntu)
        if: runner.os == 'Linux'
        run: |
          ./.github/workflows/install-ubuntu-dependencies.sh --full
      - run: test/ci-build.sh

