Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.42 KiB
Newer Older
Simon Wittl's avatar
Simon Wittl committed
stages:
Simon Wittl's avatar
Simon Wittl committed
  - test
Simon Wittl's avatar
Simon Wittl committed
  - build
Simon Wittl's avatar
Simon Wittl committed
  - docu
Simon Wittl's avatar
Simon Wittl committed

Simon Wittl's avatar
Simon Wittl committed
cache:
Simon Wittl's avatar
Simon Wittl committed
  key: cache-$CI_COMMIT_REF_SLUG
Simon Wittl's avatar
Simon Wittl committed
  paths:
Simon Wittl's avatar
Simon Wittl committed
    - install
Simon Wittl's avatar
Simon Wittl committed

Simon Wittl's avatar
Simon Wittl committed
.before_script_template: &before_script_template
Simon Wittl's avatar
Simon Wittl committed
  before_script:
Simon Wittl's avatar
Simon Wittl committed
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_interfaces
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_hardware
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_controller
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_ddetection
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_trajectory
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_reconstruction
    - apt-get update && apt-get install -y wget python3-pip
    - rosdep install --from-paths . -y --ignore-src
    - colcon build --merge-install
Simon Wittl's avatar
Simon Wittl committed

Simon Wittl's avatar
Simon Wittl committed
rq-pytests:
  stage: test
  image: ros:humble
Simon Wittl's avatar
Simon Wittl committed
  tags: 
    - ros2
Simon Wittl's avatar
Simon Wittl committed
  cache:
    key: cache-$CI_COMMIT_REF_SLUG
    paths:
Simon Wittl's avatar
Simon Wittl committed
      - install
Simon Wittl's avatar
Simon Wittl committed
  <<: *before_script_template
Simon Wittl's avatar
Simon Wittl committed
  script:
Simon Wittl's avatar
Simon Wittl committed
    - pip3 install pytest pytest-cov netCDF4 ros2-numpy Pillow pyometiff scipy
    # Uncomment the following line to run tests
    # - python3 -m pytest ./rq_controller/test/ --junitxml=report.xml

Simon Wittl's avatar
Simon Wittl committed
build-ros:
  stage: build
Simon Wittl's avatar
Simon Wittl committed
  image: ros:humble
Simon Wittl's avatar
Simon Wittl committed
  tags: 
    - ros2
Simon Wittl's avatar
Simon Wittl committed
  cache:
    key: cache-$CI_COMMIT_REF_SLUG
    paths:
Simon Wittl's avatar
Simon Wittl committed
      - install
Simon Wittl's avatar
Simon Wittl committed
  dependencies:
    - rq-pytests
Simon Wittl's avatar
Simon Wittl committed
  script:
Simon Wittl's avatar
Simon Wittl committed
    - source ./install/setup.bash
Simon Wittl's avatar
Simon Wittl committed
  artifacts:
    when: always
    paths:
Simon Wittl's avatar
Simon Wittl committed
      - install
Simon Wittl's avatar
Simon Wittl committed
    name: ubuntu_humble
Simon Wittl's avatar
Simon Wittl committed

Simon Wittl's avatar
Simon Wittl committed
create-docu:
  stage: docu
Simon Wittl's avatar
Simon Wittl committed
  image: ros:humble
Simon Wittl's avatar
Simon Wittl committed
  tags: 
    - ros2
Simon Wittl's avatar
Simon Wittl committed
  cache:
    key: cache-$CI_COMMIT_REF_SLUG
    paths:
Simon Wittl's avatar
Simon Wittl committed
      - install
Simon Wittl's avatar
Simon Wittl committed
  dependencies:
    - rq-pytests
Simon Wittl's avatar
Simon Wittl committed
  before_script:
Simon Wittl's avatar
Simon Wittl committed
    - apt-get update && apt-get install -y wget python3-pip
    - pip3 install pdoc3 netCDF4 ros2-numpy Pillow pyometiff scipy open3d pathfinding3d
    - git clone https://github.com/wittlsn/aRTist-PythonLib.git -b artist_thd_wip
    - pip3 install ./aRTist-PythonLib/
Simon Wittl's avatar
Simon Wittl committed
  script:
Simon Wittl's avatar
Simon Wittl committed
    - source ./install/setup.bash
Simon Wittl's avatar
Simon Wittl committed
    - mkdir -p doc
Simon Wittl's avatar
Simon Wittl committed
    - python3 -m pdoc --html rq_controller -o=./doc/rq_controller -c show_source_code=True
Simon Wittl's avatar
Simon Wittl committed
    # Uncomment the following line to generate documentation for rq_hardware
    # - python3 -m pdoc --html rq_hardware -o=./doc/rq_hardware -c show_source_code=True
Simon Wittl's avatar
Simon Wittl committed
  artifacts:
    when: always
    paths:
Simon Wittl's avatar
Simon Wittl committed
      - doc
Simon Wittl's avatar
Simon Wittl committed
    name: rq_docstrings