name: Build

on:
  [workflow_dispatch, pull_request]

env:
  BUILD_TYPE: Release
  
jobs:
  build-ubuntu:
    name: Build Ubuntu
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3.3.0
      with:
        submodules: recursive
    
    - name: Build Tools
      working-directory: ${{github.workspace}}/build
      env:
        CXX: clang++
      run: |
        cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
        cmake --build . --config $BUILD_TYPE -j4
