stages:
  - build
  - deploy

job_build:
  stage: build

  cache:
    paths:
    - build

  artifacts:
    paths:
    - build

  script:
    - cat /etc/debian_version
    - apt-get update
    - apt-get install -y unzip cmake
    - ./scripts/build-deps-unix.sh
    - ./scripts/build.sh
    - cd build
    - make
    - cd tests
    - ./testbase
    - ./testcertificate
    - ./testkey
    - ./testdata
    - cd ..
    - cp -a ../include .
    - cp src/liberpiko.a liberpiko.a
    - cp ../deps/libressl/crypto/.libs/libcrypto.a .
    - cp ../deps/libressl/ssl/.libs/libssl.a .
    - tar cJf liberpiko.linux.tar.xz include liberpiko.a libcrypto.a libssl.a

job_deploy:
  stage: deploy

  script:
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - scp -o StrictHostKeyChecking=no -P2102 build/liberpiko.linux.tar.xz deploy@202.154.58.131:repo

stages:
  - build
  - deploy

job_build:
  stage: build

  cache:
    paths:
    - build

  artifacts:
    paths:
    - build

  script:
    - cat /etc/debian_version
    #- apt-get update
    #- apt-get install -y unzip cmake
    - ./scripts/build-deps-unix.sh
    - ./scripts/build.sh
    - cd build
    - make
    - cd tests
    - ./testbase
    - ./testcertificate
    - ./testkey
    - ./testdata
    - cd ..
    - cp -a ../include .
    - cp src/liberpiko.a liberpiko.a
    - cp ../deps/libressl/crypto/.libs/libcrypto.a .
    - cp ../deps/libressl/ssl/.libs/libssl.a .
    - tar cJf liberpiko.linux.tar.xz include liberpiko.a libcrypto.a libssl.a

job_deploy:
  stage: deploy

  script:
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - scp -o StrictHostKeyChecking=no -P2102 build/liberpiko.linux.tar.xz deploy@202.154.58.131:repo

Disable update packages, runners using lab bojong
Disable update packages, runners using lab bojong
