name: Linux

on:
  push:
    branches:
      - master

jobs:
  build:
    name: GPXSee
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        config: ['release', 'debug']
    steps:
      - name: Checkout
        uses: actions/checkout@v7
      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev qtmultimedia5-dev libqt5svg5-dev libqt5serialport5-dev zlib1g-dev
      - name: Create localization
        run: lrelease gpxsee.pro
      - name: Configure build
        run: qmake CONFIG+=${{ matrix.config }} gpxsee.pro
      - name: Build project
        run: make -j4
