diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index 58d0adfbd4c..128941b0bfe 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -68,14 +68,6 @@ jobs: export LIBGL_ALWAYS_SOFTWARE=true export ROS_DISTRO=${{ matrix.ROS_DISTRO }} xvfb-run --auto-servernum make distrib -j4 - - name: Prepare Webots Controller Deployment - if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }} - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }} - - name: Deploy Webots Controller - if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }} - run: scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ matrix.os == 'ubuntu-20.04' && (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index 7fb3f04a68c..2e1ad55704d 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -64,14 +64,6 @@ jobs: export LIBGL_ALWAYS_SOFTWARE=true export ROS_DISTRO=${{ matrix.ROS_DISTRO }} xvfb-run --auto-servernum make distrib -j4 - - name: Prepare Webots Controller Deployment - if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }} - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }} - - name: Deploy Webots Controller - if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }} - run: scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ matrix.os == 'ubuntu-20.04' && (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/.github/workflows/test_suite_mac.yml b/.github/workflows/test_suite_mac.yml index a59d2161c07..3fef0c0f039 100644 --- a/.github/workflows/test_suite_mac.yml +++ b/.github/workflows/test_suite_mac.yml @@ -52,14 +52,6 @@ jobs: export JAVA_HOME="$(/usr/libexec/java_home -v 16)" export PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin/:$PATH make distrib -j4 - - name: Prepare Webots Controller Deployment - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }} - - name: Deploy Webots Controller - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - run: scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/.github/workflows/test_suite_mac_develop.yml b/.github/workflows/test_suite_mac_develop.yml index 63898bab043..f0e80bd3f97 100644 --- a/.github/workflows/test_suite_mac_develop.yml +++ b/.github/workflows/test_suite_mac_develop.yml @@ -48,14 +48,6 @@ jobs: export JAVA_HOME="$(/usr/libexec/java_home -v 16)" export PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin/:$PATH make distrib -j4 - - name: Prepare Webots Controller Deployment - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }} - - name: Deploy Webots Controller - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - run: scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/.github/workflows/test_suite_windows.yml b/.github/workflows/test_suite_windows.yml index efc597a7b1e..0589a664916 100644 --- a/.github/workflows/test_suite_windows.yml +++ b/.github/workflows/test_suite_windows.yml @@ -82,15 +82,6 @@ jobs: run: | export WEBOTS_HOME=$GITHUB_WORKSPACE make distrib -j4 - - name: Deploy Webots Controller - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - run: | - export SSH_AUTH_SOCK=/tmp/ssh_agent.sock - mkdir ~/.ssh - ssh-keyscan -H github.com > ~/.ssh/known_hosts - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}" - scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/.github/workflows/test_suite_windows_develop.yml b/.github/workflows/test_suite_windows_develop.yml index 7694d022111..c5409af0de2 100644 --- a/.github/workflows/test_suite_windows_develop.yml +++ b/.github/workflows/test_suite_windows_develop.yml @@ -78,15 +78,6 @@ jobs: run: | export WEBOTS_HOME=$GITHUB_WORKSPACE make distrib -j4 - - name: Deploy Webots Controller - if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }} - run: | - export SSH_AUTH_SOCK=/tmp/ssh_agent.sock - mkdir ~/.ssh - ssh-keyscan -H github.com > ~/.ssh/known_hosts - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}" - scripts/packaging/sync_controller_lib.sh - name: Create/Update GitHub release if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }} run: | diff --git a/scripts/packaging/sync_controller_lib.sh b/scripts/packaging/sync_controller_lib.sh deleted file mode 100755 index 0207a2d2850..00000000000 --- a/scripts/packaging/sync_controller_lib.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - - -# WEBOTS_HOME has to be specified -if [ -z "${WEBOTS_HOME}" ]; then - WEBOTS_HOME=$(pwd) -fi - -VERSION=$(cat ${WEBOTS_HOME}/scripts/packaging/webots_version.txt | sed 's/ /-/g') - -# Dynamic libraries to be copied -DYNAMIC_LIBS="Controller CppController car CppCar driver CppDriver" - -# Don't publish the libcontroller if it hasn't changed since yesterday -LAST_COMMIT_YESTERDAY=$(git log -1 --pretty=format:"%H" --before=yesterday) -LAST_COMMIT=$(git log -1 --pretty=format:"%H") -INCLUDE_DIFF_SINCE_YESTERDAY=$(git diff ${LAST_COMMIT_YESTERDAY}..${LAST_COMMIT} -- include/controller) -SOURCE_DIFF_SINCE_YESTERDAY=$(git diff ${LAST_COMMIT_YESTERDAY}..${LAST_COMMIT} -- src/controller) -VEHICLE_DIFF_SINCE_YESTERDAY=$(git diff ${LAST_COMMIT_YESTERDAY}..${LAST_COMMIT} -- projects/default/librairies/vehicle) -if [ -z "${INCLUDE_DIFF_SINCE_YESTERDAY}" ] && [ -z "${SOURCE_DIFF_SINCE_YESTERDAY}" ] && [ -z "${VEHICLE_DIFF_SINCE_YESTERDAY}" ]; then - echo "There are no changes in 'include/controller', 'src/controller' and 'projects/default/librairies/vehicle' since yesterday" - echo "Last commit yesterday: ${LAST_COMMIT_YESTERDAY}" - echo "Last commit today: ${LAST_COMMIT}" - exit 0 -fi - -# Get the repo -rm -rf /tmp/webots-controller || true -if [ ! -z "${GITHUB_ACTOR}" ]; then - git config --global user.name ${GITHUB_ACTOR} - git config --global user.email ${GITHUB_ACTOR}@github.com -fi -git clone git@github.com:cyberbotics/webots-libcontroller.git /tmp/webots-controller -if [ ! -d /tmp/webots-controller ]; then - echo 'The repository is not properly cloned' - exit 1 -fi -cd /tmp/webots-controller - -if [ ! -z $(git branch -a | egrep "/${VERSION}$") ]; then - echo "Checkout to the existing branch ${VERSION}" - git checkout ${VERSION} -else - echo "Create a new branch ${VERSION}" - git checkout -b ${VERSION} -fi - -# Copy headers and C++ source code -if [ "${OSTYPE}" != "msys" ]; then - # don't copy the include files on Windows as they are the same as on other platforms, and they generate a huge diff due to Windows line endings which differ from Linux/macOS. - rm -rf include - mkdir -p include - cp -r ${WEBOTS_HOME}/include/controller/* include - cp ${WEBOTS_HOME}/include/controller/c/webots/plugins/robot_window/{robot_window.h,robot_wwi.h} include - - rm -rf source/cpp - mkdir -p source/cpp/vehicle - cp ${WEBOTS_HOME}/src/controller/cpp/*.cpp source/cpp - cp ${WEBOTS_HOME}/projects/default/libraries/vehicle/cpp/car/src/Car.cpp source/cpp/vehicle - cp ${WEBOTS_HOME}/projects/default/libraries/vehicle/cpp/driver/src/Driver.cpp source/cpp/vehicle -fi - -# Copy dynamic libs -rm -rf lib/${OSTYPE} -mkdir -p lib/${OSTYPE} -for filename in $DYNAMIC_LIBS; do - echo $filename - find ${WEBOTS_HOME}/lib/controller -maxdepth 1 -name "*${filename}*" | xargs -I{} cp {} lib/${OSTYPE} -done - -# Copy Python libs -cp -r ${WEBOTS_HOME}/lib/controller/python lib/${OSTYPE}/ - -# Push -git add -A -git commit -m "Automatic update" -git push origin ${VERSION}