# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
  # The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize
  # Orbs reduce the amount of configuration required for common tasks.
  # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node
  node: circleci/node@4.1

jobs:
  build-14:
    docker:
      - image: node:14
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: apt-get update && apt-get install -y build-essential libbluetooth-dev
      - node/install-packages

  build-16:
    docker:
      - image: node:16
    steps:
      - checkout
      - run:
          name: Install build dependencies
          command: apt-get update && apt-get install -y build-essential libbluetooth-dev
      - node/install-packages

  build-18:
    docker:
      - image: node:18
    steps:
      - checkout
      - run:
          name: Install build dependencies
          command: apt-get update && apt-get install -y build-essential libbluetooth-dev
      - node/install-packages

workflows:
  build:
    jobs:
      - build-14
      - build-16
      - build-18
