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.0']

    steps:
    - uses: actions/checkout@v2
      
    - name: Installing Qt framework
      uses: jurplel/install-qt-action@v3
      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
