image: bitcraze/builder

stages:
  - build
  - unit_tests

build:
  stage: build
  script:
    - pwd
    - ls 
    - git submodule sync
    - git submodule update --init --recursive
    - cd crazyflie_software/crazyflie-firmware-2021.06/
    - make PLATFORM=cf2
  artifacts:
    paths:
      - crazyflie_software/crazyflie-firmware-2021.06/cf2.bin
    expire_in: 1 year

unit_tests:
  stage: unit_tests
  script:
    - pwd
    - ls 
    - git submodule sync
    - git submodule update --init --recursive
    - cd crazyflie_software/crazyflie-firmware-2021.06/
    - ./tools/build/build PLATFORM=cf2 UNIT_TEST_STYLE=min
  