Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini committed Dec 30, 2024
2 parents 14cf492 + a7666fa commit 313c40c
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 50 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "CDE for robots-configuration",
"image": "ghcr.io/robotology/robots-configuration:latest",
"remoteUser": "codespace"
}
14 changes: 14 additions & 0 deletions .github/workflows/ci-nodeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@ name: CI Workflow with nodeps CMake preset

on:
push:
branches:
- 'master'
- 'devel'
paths-ignore:
- 'experimentalSetups/**'
- 'iCubTemplates/**'
- 'tests/**'
- '.github/**'
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths-ignore:
- 'experimentalSetups/**'
- 'iCubTemplates/**'
- 'tests/**'
- '.github/**'
workflow_dispatch:

jobs:
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,22 @@ jobs:
echo "${DEPENDENCIES_DIR}/install/bin" >> $GITHUB_PATH
echo "YARP_DATA_DIRS=${DEPENDENCIES_DIR}/install/share/yarp:${DEPENDENCIES_DIR}/install/share/iCub:${DEPENDENCIES_DIR}/install/share/CER:${DEPENDENCIES_DIR}/install/share/navigation:${DEPENDENCIES_DIR}/install/share/ICUBcontrib" >> $GITHUB_ENV
- name: Configure
- name: Configure Tests
shell: bash
run: |
mkdir -p build && cd build
cmake -DCMAKE_PREFIX_PATH=${DEPENDENCIES_DIR}/install \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install \
-DBUILD_TESTING:BOOL=ON \
-DINSTALL_ALL_ROBOTS:BOOL=ON ..
cd ./tests/dry-run/
./configure-tests.sh
- name: Install
- name: Tests
shell: bash
run: |
cd build
cmake --build . --config Release --target install
- name: Test
shell: bash
run: |
cd build
cd ./tests/dry-run/build
ctest --timeout 60 --output-on-failure -L run
- name: Upload Output
if: always()
uses: actions/upload-artifact@main
with:
name: dry-run_${{ github.run_id }}
path: build/dry-run_log_*.txt
path: tests/dry-run/build/dry-run_log_*.txt
retention-days: 30
5 changes: 3 additions & 2 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
workdir: tests/dockerfiles
buildargs: DEPENDENCIES_DIR
registry: ghcr.io
tags: "latest"
- name: Clean up Registry from untagged images
uses: actions/delete-package-versions@v4.1.1
uses: actions/delete-package-versions@v5
with:
package-name: 'robots-configuration'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: "true"
delete-only-untagged-versions: "true"
11 changes: 0 additions & 11 deletions .gitpod.yml

This file was deleted.

11 changes: 11 additions & 0 deletions R1SN001/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(appname R1SN001)

set(scripts CER.xml yarprobotinterface.ini general.xml yarpmotorgui.ini firmwareupdater.ini)

yarp_install(FILES ${scripts} DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY calibrators DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY wrappers DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY hardware DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY sensors DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY camera DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})

2 changes: 1 addition & 1 deletion R1SN001/wrappers/FT/cer_right_arm-FT_wrapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">


<device xmlns:xi="http://www.w3.org/2001/XInclude" name="left_arm_as_wrapper" type="analogServer">
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="right_arm_as_wrapper" type="analogServer">
<param name="period"> 10 </param>
<param name="name"> /cer/right_arm/FT:o </param>

Expand Down
30 changes: 15 additions & 15 deletions tests/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ RUN cd ${DEPENDENCIES_DIR} && \
cmake --build . --config Release --target install

# yarp-device-rplidar
#RUN cd ${DEPENDENCIES_DIR} && \
# git clone https://github.com/robotology/yarp-device-rplidar.git && \
# cd yarp-device-rplidar && mkdir -p build && cd build && \
# git checkout master && \
# cmake .. \
# -DCMAKE_PREFIX_PATH=${DEPENDENCIES_DIR}/install \
# -DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install && \
# cmake --build . --config Release --target install
RUN cd ${DEPENDENCIES_DIR} && \
git clone https://github.com/robotology/yarp-device-rplidar.git && \
cd yarp-device-rplidar && mkdir -p build && cd build && \
git checkout master && \
cmake .. \
-DCMAKE_PREFIX_PATH=${DEPENDENCIES_DIR}/install \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install && \
cmake --build . --config Release --target install

# icub-firmware-shared
RUN cd ${DEPENDENCIES_DIR} && \
Expand Down Expand Up @@ -131,19 +131,19 @@ RUN cd ${DEPENDENCIES_DIR} && \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install && \
cmake --build . --target install

# Create user gitpod
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod && \
# Create user codespace
RUN useradd -l -u 33333 -G sudo -md /home/codespace -s /bin/bash -p codespace codespace && \
# passwordless sudo for users in the 'sudo' group
sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers

# Switch to gitpod user
USER gitpod
# Switch to codespace user
USER codespace

# Install informative git for bash
RUN git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1

# Set up .bashrc
WORKDIR /home/gitpod
WORKDIR /home/codespace
RUN echo "GIT_PROMPT_ONLY_IN_REPO=1" >> ~/.bashrc && \
echo "source \${HOME}/.bash-git-prompt/gitprompt.sh" >> ~/.bashrc && \
echo "export DEPENDENCIES_DIR=${DEPENDENCIES_DIR}" >> ~/.bashrc && \
Expand All @@ -153,8 +153,8 @@ RUN echo "GIT_PROMPT_ONLY_IN_REPO=1" >> ~/.bashrc && \
# Switch back to root
USER root

# Make sure specific dirs are owned by gitpod user
RUN chown -R gitpod.gitpod ${DEPENDENCIES_DIR}
# Make sure specific dirs are owned by codespace user
RUN chown -R codespace.codespace ${DEPENDENCIES_DIR}

RUN rm -Rf /var/lib/apt/lists/*

Expand Down
26 changes: 26 additions & 0 deletions tests/dry-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,29 @@ The CI can perform two types of dry-run:
2. DEV dry-run, to check the consistency of the devices: e.g., missing parameters, deprecated devices...

The output of the dry-run is stored as artifact within the CI workflow to enable later inspection.

### Invoking `ctest`

#### List available tests
```console
ctest -N
```

#### Run specific tests
```console
ctest -R test_name
ctest -R "test.*"
```

#### Run tests associated with specific labels
```console
ctest -L "all;run;skip"
```

#### Run all available tests
```console
ctest
```

### Skipped tests
Tests that have to be ignored are listed in the `skip_tests.txt` file.
14 changes: 14 additions & 0 deletions tests/dry-run/configure-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/bash
################################################################################
# #
# Copyright (C) 2024 Fondazione Istitito Italiano di Tecnologia (IIT) #
# All Rights Reserved. #
# #
################################################################################

mkdir -p build && cd build
cmake -DCMAKE_PREFIX_PATH=${DEPENDENCIES_DIR}/install \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install \
-DBUILD_TESTING:BOOL=ON \
-DINSTALL_ALL_ROBOTS:BOOL=ON ../../../
cmake --build . --config Release --target install
7 changes: 1 addition & 6 deletions tests/dry-run/skip_tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
dry-run_R1SN001_xml
dry-run_R1SN002_xml
dry-run_R1SN003_xml
dry-run_R1SN001_dev
dry-run_R1SN002_dev
dry-run_R1SN003_dev
dry-run_R1SN002_dev

0 comments on commit 313c40c

Please sign in to comment.