name: Linux Build
on:
  push:
      branches: [ master ]
  pull_request:
      branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Check for Updates
        run: sudo apt-get update -y

      - name: Install Required Packages
        run: sudo apt-get install -y git make cmake clang libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-dev

      - name: Update Compilers
        run: source ./apps/ci/ci-compiler-update.sh

      - name: Check for Submodule Updates
        run: source ./apps/ci/ci-submodule-update.sh

      - name: Build Mangos Project
        run: source ./apps/ci/ci-compile.sh
