name: Haskell CI

on: [push, pull_request]

jobs:
  build:

    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        ghc: ['8.8.2']
        cabal: ['3.0']
        os: [ubuntu-latest]

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: 'recursive'
    - uses: actions/setup-haskell@v1
      with:
        ghc-version: ${{ matrix.ghc }}
        cabal-version: ${{ matrix.cabal }}

    - name: Cache
      uses: actions/cache@v1
      env:
        cache-name: cache-cabal
      with:
        path: ~/.cabal
        key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
        restore-keys: |
          ${{ runner.os }}-build-${{ env.cache-name }}-
          ${{ runner.os }}-build-
          ${{ runner.os }}-

    - name: Install system dependencies
      if: matrix.os == 'ubuntu-latest'
      run: |
        wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
        sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-bionic.list http://packages.lunarg.com/vulkan/lunarg-vulkan-bionic.list
        sudo apt-get update
        sudo apt-get install libvulkan-dev glslang-tools libsdl2-dev

    - name: Install dependencies
      run: |
        cabal update
        cabal build --only-dependencies --enable-tests --enable-benchmarks

    - name: Build
      run: cabal build --enable-tests --enable-benchmarks vulkan VulkanMemoryAllocator vulkan-utils vulkan-examples

Add github action for building with cabal
Add github action for building with cabal
