name: Linux build

on:
  push:
    branches: [ main, develop, 1.* ]
    tags: 1.*
    
  pull_request:
    branches: [ main, develop, 1.* ]

jobs:
  build:
    runs-on: ubuntu-22.04

    strategy:
      matrix:
        qt: ['6.4.3', '6.5.3', '6.6.3', '6.7.3', '6.8.3', '6.9.0']

    steps:
    - uses: actions/checkout@v4
      
    - name: Installing Qt framework
      uses: jurplel/install-qt-action@v4
      with:
        version: ${{ matrix.qt }}      

    - name: Running qmake
      run:  cd $GITHUB_WORKSPACE; qmake pgmodeler.pro -r PREFIX=$GITHUB_WORKSPACE/build CONFIG+=debug

    - name: Building pgModeler
      run: make -j6
     
    - name: Deploying pgModeler
      run: make install
