version: 2
jobs:
  build:
    docker:
      - image: px4io/px4-dev-nuttx:2020-01-13
    steps:
      - checkout
      - run:
          name: Fetch tags
          command: git fetch --tags
      - run:
          name: Build px4_fmu-v5_default
          command: make px4_fmu-v5_default
      - store_artifacts:
          path: build/px4_fmu-v5_default/px4_fmu-v5_default.px4
          destination: px4_fmu-v5_default.px4
      - store_artifacts:
          path: build/px4_fmu-v5_default/px4_fmu-v5_default.elf
          destination: px4_fmu-v5_default.elf
