name: Continuous Integration v2.x

#trigger when these occur
on:
  push:
    branches:
      - v2
  pull_request:
    types:
      - opened
      - edited
      - reopened
    branches:
      - v2
  workflow_dispatch:

jobs:
  #CI workflows across all supported platforms
  standard:
    strategy:
      fail-fast: false
      matrix:
        platforms:
          - ubuntu-latest
          - windows-latest
          - macos-latest
    runs-on: ${{ matrix.platforms }}
    steps:
      - uses: actions/checkout@v6
      - name: Run all tests
        run: make tests

  gdb:
    strategy:
      fail-fast: false
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Install GDB if not present
        run: sudo apt update && sudo apt install gdb
      - name: Run all tests under gdb
        run: make tests-gdb