name: JRL-cmakemodules
on: [push,pull_request]
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  with-submodules:
    name: Check configuration with git submodules
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy python3-scipy
      - run: cmake .


  without-submodules:
    name: Check configuration without git submodules
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: false
          path: eigenpy
      - run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy python3-scipy
      - run: cmake -B build -S eigenpy
      - run: grep -qvz CMAKE_PROJECT_VERSION:STATIC=0.0 build/CMakeCache.txt
