stages:
  - setup_env
  - build

setup_env_job:
  stage: setup_env
  script:
    - sudo apt-get update -qq
    - sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev

build_job:
  stage: build
  script:
    - ./premake5_x64 gmake
    - cd Build
    - make config=release_x64 all
    - mv ../Bin/Release/libml_gps.so ../ml_gps.so
    - mv ../test/sa_nodes.json ../sa_nodes.json
  artifacts:
    name: "$CI_BUILD_NAME"
    paths:
      - ml_gps.so
      - sa_nodes.json

stages:
  - setup_env
  - build
  - deploy

setup_env_job:
  stage: setup_env
  script:
    - sudo apt-get update -qq
    - sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev

build_job:
  stage: build
  script:
    - ./premake5_x64 gmake
    - cd Build
    - make config=release_x64 all
    - mv ../Bin/Release/libml_gps.so ../ml_gps.so
    - mv ../test/sa_nodes.json ../sa_nodes.json
  artifacts:
    name: "$CI_BUILD_NAME"
    paths:
      - ml_gps.so
      - sa_nodes.json

deploy_job:
    stage: deploy
    script:
      - sudo mkdir -p /builddata
      - sudo cp ml_gps.so /builddata/

Add deploy job (copy ml_gps.so to /builddata/)
Add deploy job (copy ml_gps.so to /builddata/)
