name: Mistral CI tests

on: [push, pull_request]

jobs:
  Build-nextpnr:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2
      with:
        submodules: recursive

    - uses: actions/setup-python@v2

    - name: Install
      run: |
        sudo apt-get update
        sudo apt-get install git make cmake libboost-all-dev python3-dev libeigen3-dev tcl-dev lzma-dev clang bison flex swig

    - name: Execute build nextpnr
      env:
        MISTRAL_PATH: ${{ github.workspace }}/deps/mistral
        MISTRAL_REVISION: 0c2ab2b2c6af33fea1c20349be2e0068366ed615 
      run: |
        source ./.github/ci/build_mistral.sh
        get_dependencies
        build_nextpnr
        run_archcheck
