[19980] Initial CI setup #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-20.04 | |
- ubuntu-22.04 | |
# - windows-2019 | |
# - windows-2021 | |
steps: | |
- name: Download repos file | |
uses: eProsima/eProsima-CI/multiplatform/get_file_from_repo@v0 | |
with: | |
source_repository: eProsima/SustainML | |
source_repository_branch: main | |
file_name: sustainml.repos | |
file_result: ${{ github.workspace }}/sustainml.repos | |
- name: Install Fast DDS dependencies | |
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0 | |
with: | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
- name: Fetch SustainML repositories | |
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 | |
with: | |
vcs_repos_file: ${{ github.workspace }}/sustainml.repos | |
destination_workspace: ${{ github.workspace }}/src | |
- name: Sync repository | |
uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
path: ${{ github.workspace }}/src/sustainml | |
- name: Download dependencies and install requirements | |
uses: ./src/sustainml/.github/actions/project_dependencies | |
with: | |
os: ${{ matrix.os }} | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
dependencies_artifact_postfix: ${{ github.event.inputs.dependencies_artifact_postfix || env.default_dependencies_artifact_postfix }} | |
secret_token: ${{ secrets.GITHUB_TOKEN }} | |
- 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/.github/workflows/configurations/${{ runner.os }}/colcon.meta | |
##################################################################### | |
# CLANG | |
clang: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download repos file | |
uses: eProsima/eProsima-CI/multiplatform/get_file_from_repo@v0 | |
with: | |
source_repository: eProsima/SustainML | |
source_repository_branch: main | |
file_name: sustainml.repos | |
file_result: ${{ github.workspace }}/sustainml.repos | |
- name: Install Fast DDS dependencies | |
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0 | |
with: | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
- name: Fetch SustainML repositories | |
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 | |
with: | |
vcs_repos_file: ${{ github.workspace }}/sustainml.repos | |
destination_workspace: ${{ github.workspace }}/src | |
- name: Sync repository | |
uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
path: ${{ github.workspace }}/src/sustainml | |
- name: Download dependencies and install requirements | |
uses: ./src/sustainml/.github/actions/project_dependencies | |
with: | |
os: ${{ matrix.os }} | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
dependencies_artifact_postfix: ${{ github.event.inputs.dependencies_artifact_postfix || env.default_dependencies_artifact_postfix }} | |
secret_token: ${{ secrets.GITHUB_TOKEN }} | |
- 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/.github/workflows/configurations/Linux/colcon.meta | |
##################################################################### | |
# UNCRUSTIFY | |
uncrustify: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Uncrustify | |
uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0 |