# Specify the docker image to use (only used if using docker runners)
# See: http://doc.gitlab.com/ee/ci/docker/using_docker_images.html
image: debian:stable-slim

# Define commands that run before each job's script
before_script:
  - apt-get update
  - apt-get install -y make gcc g++ libboost-dev liblua5.3-dev git
  # ======================
  # EditorConfig Toolchain
  # ======================
  # Install Node.js:
  - apt-get install -y curl
  - curl -sL https://deb.nodesource.com/setup_20.x | bash
  - apt-get install -y nodejs
  - node -v
  - npm -v
  # Install EClint:
  - npm install -g eclint

compile:
  script:
    - make
    - make install
    # Verify that our compiled app works properly with a custom "test" script
    - bash ./src/ci_test.sh

validate:
  script:
    # Validate committed files against EditorConfig settings via EClint using
    # a custom script that in case of error lists only the problematic files:
    - bash ./validate.sh

