Skip to content
Snippets Groups Projects
.gitlab-ci.yml 8.02 KiB
Newer Older
################################################################################
## Copyright © 2018 Privategrity Corporation                                   #
##                                                                             #
## All rights reserved.                                                        #
################################################################################

# This drives all the integration tests. When you create a new test, add it as a
# new stage to this file. The stage should have a very clear report and may need
# to run a couple commands to publish.

cache:
  untracked: true
  key: "$CI_BUILD_REF_NAME"
#  paths:
#    - vendor/

variables:
Spencer Brown's avatar
Spencer Brown committed
  REPO_DIR: gitlab.com/elixxir
  # See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch
  REPOS_API: https://$GITLAB_SERVER/api/v4/projects/elixxir%2F
  GPULIB_URL: ""
  CLIENT_URL: ""
  REGISTRATION_URL: ""
  GATEWAY_URL: ""
  DEFAULTBRANCH: "release"
  ##  - go version || echo "Go executable not found."
  ##  - mkdir -p $GOPATH/src/$REPO_DIR
  ##  - ln -s $CI_PROJECT_DIR $GOPATH/src/$REPO_DIR/$REPO_NAME
  ##  - cd $GOPATH/src/$REPO_DIR/$REPO_NAME
  - echo $CI_BUILD_REF
  - echo $CI_PROJECT_DIR
  - tests
Richard Carback's avatar
Richard Carback committed
  - benchmark
Josh Brooks's avatar
Josh Brooks committed
  stage: installbinaries
  tags:
    - gpu
    - git clean -ffdx
    - ./download_cmix_binaries.sh l d
Rick Carback's avatar
Rick Carback committed
    - mkdir -p /opt/xxnetwork/lib
    - cp bin/libpowmosm75.so /opt/xxnetwork/lib/
    - cp bin/libpow.fatbin /opt/xxnetwork/lib/
    - bin/server version
    - bin/client version
    - bin/gateway version
    expire_in: '1 day'
      - bin/
basice2e_local:
  stage: tests
  # - gpu
Rick Carback's avatar
Rick Carback committed
    - echo $PWD
    - rm -fr results
    - rm -fr results-cpu
    - rm -fr results-gpu
Sydney Anne Erickson's avatar
Sydney Anne Erickson committed
    # - ls -lha
    # - ./run.sh
    # - mv results results-cpu
Sydney Anne Erickson's avatar
Sydney Anne Erickson committed
    - mkdir -p /opt/xxnetwork/lib
    - ./run.sh --run basice2e_local
Sydney Anne Erickson's avatar
Sydney Anne Erickson committed
    - mv results results-gpu
    when: always
    expire_in: '1 day'
      - results/
      - bin/
Rick Carback's avatar
Rick Carback committed

basice2e:
Josh Brooks's avatar
Josh Brooks committed
  stage: tests
  tags:
  # - gpu
Josh Brooks's avatar
Josh Brooks committed
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - rm -fr results-cpu
    - rm -fr results-gpu
    # - ls -lha
    # - ./run.sh
    # - mv results results-cpu
    # - sleep 60
    - mkdir -p /opt/xxnetwork/lib
    - ./run.sh --run basice2e
Josh Brooks's avatar
Josh Brooks committed
    - mv results results-gpu
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
Josh Brooks's avatar
Josh Brooks committed
      - bin/
Josh Brooks's avatar
Josh Brooks committed
backup:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run backup
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
      - bin/
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run dm
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
historical:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run historical
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
      - bin/

channels:
  stage: tests
  tags:
    #- gpu
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - rm -fr results-cpu
    - rm -fr results-gpu
Josh Brooks's avatar
Josh Brooks committed
    # - ls -lha
    # - ./run.sh
    # - mv results results-cpu
    # - sleep 60
    - mkdir -p /opt/xxnetwork/lib
    - ./run.sh --run channels
Josh Brooks's avatar
Josh Brooks committed
    - mv results results-gpu
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
      - bin/

# channelsFileTransfer:
#   stage: tests
#   image: $DOCKER_IMAGE
#   script:
#     - mkdir -p ~/.elixxir
#     - echo $PWD
#     - rm -fr results
#     - ./run.sh --run channelsFileTransfer
#   artifacts:
#     when: always
#     expire_in: '1 day'
#     paths:
#       - results/
#       - bin/

fileTransfer:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run fileTransfer
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
Josh Brooks's avatar
Josh Brooks committed
      - bin/

connect:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run connect
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
Josh Brooks's avatar
Josh Brooks committed

# broadcast:
#   stage: tests
#   image: $DOCKER_IMAGE
#   script:
#     - mkdir -p ~/.elixxir
#     - echo $PWD
#     - rm -fr results
#     - ./run.sh --run broadcast
#   artifacts:
#     when: always
#     expire_in: '1 day'
#     paths:
#       - results/
#       - bin/
Josh Brooks's avatar
Josh Brooks committed
singleUse:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run singleUse
Josh Brooks's avatar
Josh Brooks committed
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
Josh Brooks's avatar
Josh Brooks committed
      - bin/
Josh Brooks's avatar
Josh Brooks committed
ephemeralRegistration:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run ephemeralRegistration
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
Jono Wenger's avatar
Jono Wenger committed
groupChat:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run groupChat
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
basice2e_protonet:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - cd basice2e
    - rm -fr results
    - ./run.sh protonet
    - cd ..
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - basice2e/
      - bin/
    #  When merging in projects that need to be deployed, this field will have to
    #  be TEMPORARILY changed to master until deployment is completed. BE SURE TO REVERT
    #  ONCE DEPLOYMENT IS COMPLETE.
    - master

# basice2e_betanet:
#   stage: tests
#   image: $DOCKER_IMAGE
#   script:
#     - mkdir -p ~/.elixxir
#     - echo $PWD
#     - cd basice2e
#     - rm -fr results
#     - ./run.sh betanet
#     - cd ..
#   artifacts:
#     when: always
#     expire_in: '1 day'
#     paths:
#      - basice2e/
#      - bin/

Rick Carback's avatar
Rick Carback committed
smokeinfra:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - cd smokeinfra
    - ./run.sh
    - cd ..
  artifacts:
    when: always
    expire_in: '1 day'
Rick Carback's avatar
Rick Carback committed
    paths:
      - smokeinfra/results/
      - bin/
Rick Carback's avatar
Rick Carback committed
smokeinfraBatch4:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - cd smokeinfra
    - git checkout -- .
    - sed -i 's/\ 42,/\ 4,/g' registration.json
Rick Carback's avatar
Rick Carback committed
    - ./run.sh
    - cd ..
  artifacts:
    when: always
    expire_in: '1 day'
Rick Carback's avatar
Rick Carback committed
    paths:
      - smokeinfra/results/
      - bin/
Josh Brooks's avatar
Josh Brooks committed
rekey:
  stage: tests
  image: $DOCKER_IMAGE
  script:
    - mkdir -p ~/.elixxir
    - echo $PWD
    - rm -fr results
    - ./run.sh --run rekey
  artifacts:
    when: always
    expire_in: '1 day'
    paths:
      - results/
      - bin/

# smokeinfraBatch1:
#   stage: tests
#   image: $DOCKER_IMAGE
#   script:
#     - mkdir -p ~/.elixxir
#     - echo $PWD
#     - cd smokeinfra
#     - git checkout -- .
#     - sed -i 's/\ 42/\ 1/g' *.yaml
#     - ./run.sh
#     - cd ..
#   artifacts:
#     when: always
#     expire_in: '1 day'
Rick Carback's avatar
Rick Carback committed
benchmark:
  stage: benchmark
  image: $DOCKER_IMAGE
  script:
    # These take about 2 minutes each right now, so 16 total
    - ./bin/server benchmark -b 1024 -n 1 -i 4
    - ./bin/server benchmark -b 1024 -n 5 -i 1
    expire_in: '1 day'