Skip to content

test

test #488

Workflow file for this run

name: test
on:
workflow_dispatch:
inputs:
dependencies_artifact_postfix:
description: 'Postfix name to add to artifact name to download dependencies. This is use to download a specific artifact version from eProsima-CI.'
required: true
default: '_nightly'
pull_request:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
env:
code_packages_names: 'sustainml_cpp sustainml_py sustainml_docs sustainml_modules'
default_dependencies_artifact_postfix: '_nightly'
jobs:
#####################################################################
# TEST
multiplatform-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cmake_build_type:
- Release
- Debug
os:
- ubuntu-22.04
steps:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src/sustainml_lib
ref: ${{ github.head_ref || github.ref_name }}
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Install apt dependencies
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: doxygen graphviz imagemagick python3 python3-pip python3-sphinxcontrib.spelling python3-venv software-properties-common wget clang-tidy curl grep
update: false
upgrade: false
- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: colcon-common-extensions colcon-mixin vcstool gcovr==5
upgrade: false
- name: Install Python documentation dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
requirements_file_name: ${{ github.workspace }}/src/sustainml_lib/sustainml_docs/requirements.txt
upgrade: false
- name: Install Python submodules dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
requirements_file_name: ${{ github.workspace }}/src/sustainml_lib/sustainml_modules/requirements.txt
upgrade: false
- name: Install ollama
run: curl -fsSL https://ollama.com/install.sh | sh
- name: Fetch SustainML repositories
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/sustainml_lib/sustainml.repos
destination_workspace: ${{ github.workspace }}/src
skip_existing: true
- name: Run ollama
run: |
ollama serve &
ollama pull llama3
- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: sustainml_cpp sustainml_py sustainml_modules
cmake_args: -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
colcon_meta_file: ${{ github.workspace }}/src/sustainml_lib/.github/workflows/configurations/${{ runner.os }}/colcon.meta
#####################################################################
# CLANG
clang:
runs-on: ubuntu-22.04
steps:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src/sustainml_lib
ref: ${{ github.head_ref || github.ref_name }}
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Install apt dependencies
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: doxygen graphviz imagemagick python3 python3-pip python3-sphinxcontrib.spelling python3-venv software-properties-common wget clang-tidy curl grep
update: false
upgrade: false
- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: colcon-common-extensions colcon-mixin vcstool gcovr==5
upgrade: false
- name: Install Python documentation dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
requirements_file_name: ${{ github.workspace }}/src/sustainml_lib/sustainml_docs/requirements.txt
upgrade: false
- name: Install Python submodules dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
requirements_file_name: ${{ github.workspace }}/src/sustainml_lib/sustainml_modules/requirements.txt
upgrade: false
- name: Install ollama
run: curl -fsSL https://ollama.com/install.sh | sh
- name: Fetch SustainML repositories
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/sustainml_lib/sustainml.repos
destination_workspace: ${{ github.workspace }}/src
skip_existing: true
- name: Run ollama
run: |
ollama serve &
ollama pull llama3
- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/clang_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
colcon_meta_file: ${{ github.workspace }}/src/sustainml_lib/.github/workflows/configurations/Linux/colcon.meta
#####################################################################
# UNCRUSTIFY
uncrustify:
runs-on: ubuntu-22.04
steps:
- name: Uncrustify
uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0