From c55194564a2d06e006e48153483cf572d7fe073e Mon Sep 17 00:00:00 2001 From: fherrero <fherrero@iri.upc.edu> Date: Fri, 26 Jul 2019 12:14:41 +0200 Subject: [PATCH] CI: add firmware dependencies --- .gitlab-ci.yml | 13 ++++++------- src/CMakeLists.txt | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 860a1f7..0c608c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,8 @@ before_script: - apt update - - apt -y install git sudo + - apt -y install git #add to docker image? + - apt -y install sudo #needed for sudo commands in privileges.sh script - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null @@ -14,8 +15,6 @@ - ssh-keyscan -p 2202 gitlab.iri.upc.edu >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - ssh -p 2202 git@gitlab.iri.upc.edu #test - - apt update - - apt -y install git - git submodule sync --recursive - git submodule update --init --recursive @@ -29,12 +28,14 @@ script: - apt update - apt -y install iri-iriutils-dev iri-comm-dev iri-dynamixel-dev + - apt -y install gcc-avr avr-libc #firmware dependencies - mkdir -pv build - cd build - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG .. - ls .. - - make package -j $(nproc) - make firmware -j $(nproc) + - make package -j $(nproc) + artifacts: paths: - build/*.deb @@ -49,6 +50,4 @@ - "scp -i /root/.ssh/iriLabKeyNopwd -r *battery-monitor*.deb irilabo@147.83.76.226:packages/" - "ssh irilabo@147.83.76.226 -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh battery-monitor" only: - - tags - - \ No newline at end of file + - tags \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a720e0..fc4ef31 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,4 +64,5 @@ add_custom_target(firmware COMMAND make INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../${firmware_dir}/avr8_battery_monitor_eeprom.hex ${CMAKE_CURRENT_SOURCE_DIR}/../${firmware_dir}/avr8_battery_monitor.hex - DESTINATION lib/firmware/iri/${PROJECT_NAME}) \ No newline at end of file + DESTINATION lib/firmware/iri/${PROJECT_NAME} + OPTIONAL) \ No newline at end of file -- GitLab