name: C++ CI

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
      with:
        submodules: true
    - name: Setup
      run: |
        sudo add-apt-repository ppa:ubuntu-toolchain-r/test
        sudo apt update
        sudo apt-get install yasm ninja-build g++-9 ccache
        export CXX="g++-9" CC="gcc-9"
        cd $VCPKG_INSTALLATION_ROOT
        git pull
        bootstrap-vcpkg.sh
        vcpkg install catch2 docopt fmt ms-gsl eigen3 tbb cgal
    - name: Build
      shell: bash 
      run: |
        pwd
        mkdir build
        cd build
        export VCPKG_ARG=-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
        cmake $VCPKG_ARG -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
        cmake --build .
    - name: Test
      run: |
        cd build
        cmake --build . --target test & exit 0

name: C++ CI

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
      with:
        submodules: true
    - name: Setup
      run: |
        sudo add-apt-repository ppa:ubuntu-toolchain-r/test
        sudo apt update
        sudo apt-get install yasm ninja-build g++-9 ccache
        export CXX="g++-9" CC="gcc-9"
        cd $VCPKG_INSTALLATION_ROOT
        vcpkg install catch2 docopt fmt ms-gsl eigen3 tbb cgal
    - name: Build
      shell: bash 
      run: |
        pwd
        mkdir build
        cd build
        export VCPKG_ARG=-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
        cmake $VCPKG_ARG -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
        cmake --build .
    - name: Test
      run: |
        cd build
        cmake --build . --target test & exit 0

Revert "Second try at fixing GitHub workflows"
Revert "Second try at fixing GitHub workflows"

This reverts commit 799b7c7540f66f8bfd8e172ad9e4000066386d51.
