From fc96afcad97e5539b62df289da6b4d661a383f1a Mon Sep 17 00:00:00 2001 From: Tomas Baca Date: Mon, 13 Nov 2023 14:28:40 +0100 Subject: [PATCH] initial commit --- .github/workflows/deploy.yml | 51 +++++++++++++++++++++++ .github/workflows/squash.yml | 35 ++++++++++++++++ .gitignore | 7 ++++ LICENSE | 28 +++++++++++++ README.md | 4 ++ resources/apt/ctu-mrs-apt.list | 1 + resources/apt/ctu-mrs-ppa-preferences.txt | 3 ++ resources/apt/ctu-mrs.gpg | 51 +++++++++++++++++++++++ resources/rosdep/ctu-mrs-amd64.list | 4 ++ resources/rosdep/ctu-mrs-arm64.list | 4 ++ resources/rosdep/handcrafted_amd64.yaml | 8 ++++ resources/rosdep/handcrafted_arm64.yaml | 8 ++++ resources/rosdep/handcrafted_common.yaml | 25 +++++++++++ resources/scripts/add_ppa.sh | 22 ++++++++++ resources/scripts/add_ros_ppa.sh | 25 +++++++++++ resources/scripts/remove_ppa.sh | 12 ++++++ 16 files changed, 288 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/squash.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 resources/apt/ctu-mrs-apt.list create mode 100644 resources/apt/ctu-mrs-ppa-preferences.txt create mode 100644 resources/apt/ctu-mrs.gpg create mode 100644 resources/rosdep/ctu-mrs-amd64.list create mode 100644 resources/rosdep/ctu-mrs-arm64.list create mode 100644 resources/rosdep/handcrafted_amd64.yaml create mode 100644 resources/rosdep/handcrafted_arm64.yaml create mode 100644 resources/rosdep/handcrafted_common.yaml create mode 100755 resources/scripts/add_ppa.sh create mode 100755 resources/scripts/add_ros_ppa.sh create mode 100755 resources/scripts/remove_ppa.sh diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..53a03072 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,51 @@ +name: Deploy + +on: + push: + branches: + - master + paths-ignore: + - '**/README.md' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-20.04 + env: + + RELEASE_KEY: ${{ secrets.RELEASE_KEY }} + PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} + + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # fetch the whole history + + - name: Checkout CI scripts + uses: actions/checkout@v3 + with: + repository: ctu-mrs/ci_scripts + path: .ci_scripts + token: ${{ secrets.PUSH_TOKEN }} + + - name: Checkout PPA debs + uses: actions/checkout@v3 + with: + repository: ctu-mrs/ppa-testing + path: .debs + ref: debs + token: ${{ secrets.PUSH_TOKEN }} + + - name: Release + run: .ci_scripts/ppa_maintanance/release.sh testing from-master-branch + + - name: Push + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./ + force_orphan: true diff --git a/.github/workflows/squash.yml b/.github/workflows/squash.yml new file mode 100644 index 00000000..b3cda58c --- /dev/null +++ b/.github/workflows/squash.yml @@ -0,0 +1,35 @@ +name: Squash + +on: + + schedule: + - cron: '0 0 * * *' # at the end of every day + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-20.04 + env: + + RELEASE_KEY: ${{ secrets.RELEASE_KEY }} + PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} + + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # fetch the whole history + + - name: Checkout CI scripts + uses: actions/checkout@v3 + with: + repository: ctu-mrs/ci_scripts + path: .ci_scripts + token: ${{ secrets.PUSH_TOKEN }} + + - name: Squash debs + if: "!contains(github.event.head_commit.message, 'squashed')" + run: .ci_scripts/ppa_maintanance/squash_branch.sh github.com/ctu-mrs/ppa-testing debs diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5a7860b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.swp +*.swo + +act.sh + +.ci_scripts +.debs diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..1d04bbfa --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2023, Multi-robot Systems (MRS) group at Czech Technical University in Prague + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..e57f7f36 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# PPA testing + +Personal Package Archive (PPA) for testing MRS deb packages. +This PPA **is not meant** to be used by user. diff --git a/resources/apt/ctu-mrs-apt.list b/resources/apt/ctu-mrs-apt.list new file mode 100644 index 00000000..3ed138e1 --- /dev/null +++ b/resources/apt/ctu-mrs-apt.list @@ -0,0 +1 @@ +deb [signed-by=/etc/apt/trusted.gpg.d/ctu-mrs.gpg] https://ctu-mrs.github.io/ppa-testing ./ diff --git a/resources/apt/ctu-mrs-ppa-preferences.txt b/resources/apt/ctu-mrs-ppa-preferences.txt new file mode 100644 index 00000000..64756a68 --- /dev/null +++ b/resources/apt/ctu-mrs-ppa-preferences.txt @@ -0,0 +1,3 @@ +Package: * +Pin: release o=ctu-mrs,l=testing,c= +Pin-Priority: 1666 diff --git a/resources/apt/ctu-mrs.gpg b/resources/apt/ctu-mrs.gpg new file mode 100644 index 00000000..e1991bcc --- /dev/null +++ b/resources/apt/ctu-mrs.gpg @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGSxfAQBEACw1jeV9Rx2V6/xkdUgAzYNQR1XaIKCxcjD9B80MeWzBUfBo2EE +ip1+lphaeCj792a5Bg+a/nRPf+D2NH+lARJt2lXTHquMOqQR0evaEu93/CDkFezZ +lYwIFJ1PsYcsJuTcqQJ/XmtDwHuJQDBW2OrZFEC3/bsVRbQ3PRMlQ2afdkb8Pzup +bMe3bdDKy5YwZfKotIpkqLebeXb27BONbTWQMGtb7ws4A9NMkNenQSbLb6sTGvj1 +1Whtm0Hev4QXaKwr097R170qb2Y+y9wDzeCTLrJLZoaivKfv1QH+YwOtkcxUx8AC +MCZsc1c8iQ10c1msbBr1che/Eil4UR5TxC5J6MHRvqUAv2H/ENb7akbd4qsbOkx4 +RvLdVA5TzYBt7CFMLRJI4g5D3BKGDt9eB2O7FsPqD2wloRnEDq8zWTYTz2u14HZb +c6U3RR9TRkxIT069+yGV5TT9zXIqQ0J1TrUj19Wt2PVFGDI+/fq37BYmPhobh7Bd +MEwmdje7SRjEcDxIqJAaAXJTlWlw/F5e/KvmpyuaFAmSt6Xze0uZ+ENs5P2C5nl3 +GX62Bie10BKmQHngvJH8Td1FRxNv7UP2FYW2GS/XO+dpT8ncepDaUSSKnqsIxfwB +qhmwvjH2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P1yIJ/iympXfhDlWuOv3oierXQO8+MQmm3cHDhXtQ +7iWusv0gTEnN9Kh389DXbZqVemQ45+Ze8IIcp/SnNE11Wh2UYHX4J4J5a49nh3ZQ +cK6HL3x0aRvMxsLaDUl0ZZbBquCJU/lqdwf9xAwXoTtIYj3fpHlqUTvLNN/AUwLA +ACXtbzYkG8yLcz+y6Su/NQJfmPHXKYGGVTVMImRkyqbvfofeAHHF+wYLEW4lBUw= +=UzbT +-----END PGP PUBLIC KEY BLOCK----- diff --git a/resources/rosdep/ctu-mrs-amd64.list b/resources/rosdep/ctu-mrs-amd64.list new file mode 100644 index 00000000..1b84f33e --- /dev/null +++ b/resources/rosdep/ctu-mrs-amd64.list @@ -0,0 +1,4 @@ +yaml https://ctu-mrs.github.io/ppa-testing/generated_mrs_amd64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/generated_thirdparty_amd64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/handcrafted_amd64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/handcrafted_common.yaml diff --git a/resources/rosdep/ctu-mrs-arm64.list b/resources/rosdep/ctu-mrs-arm64.list new file mode 100644 index 00000000..b4b85b88 --- /dev/null +++ b/resources/rosdep/ctu-mrs-arm64.list @@ -0,0 +1,4 @@ +yaml https://ctu-mrs.github.io/ppa-testing/generated_mrs_arm64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/generated_thirdparty_arm64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/handcrafted_arm64.yaml +yaml https://ctu-mrs.github.io/ppa-testing/handcrafted_common.yaml diff --git a/resources/rosdep/handcrafted_amd64.yaml b/resources/rosdep/handcrafted_amd64.yaml new file mode 100644 index 00000000..f3315898 --- /dev/null +++ b/resources/rosdep/handcrafted_amd64.yaml @@ -0,0 +1,8 @@ +# this file defines the list of APT dependencies for ROS packages +# +# ros_package_dependency: +# ubuntu: [apt dependencies] +# + +dummy_node_to_have_something_here: + ubuntu: [dummy_node_to_have_something_here] diff --git a/resources/rosdep/handcrafted_arm64.yaml b/resources/rosdep/handcrafted_arm64.yaml new file mode 100644 index 00000000..f3315898 --- /dev/null +++ b/resources/rosdep/handcrafted_arm64.yaml @@ -0,0 +1,8 @@ +# this file defines the list of APT dependencies for ROS packages +# +# ros_package_dependency: +# ubuntu: [apt dependencies] +# + +dummy_node_to_have_something_here: + ubuntu: [dummy_node_to_have_something_here] diff --git a/resources/rosdep/handcrafted_common.yaml b/resources/rosdep/handcrafted_common.yaml new file mode 100644 index 00000000..6f513493 --- /dev/null +++ b/resources/rosdep/handcrafted_common.yaml @@ -0,0 +1,25 @@ +# this file defines the list of APT dependencies for ROS packages +# +# ros_package_dependency: +# ubuntu: [apt dependencies] +# + +# px4 is build using a custom script outside of the bloom pipeline +px4: + ubuntu: [ros-noetic-px4] + +# non-ROS dependencies managed by MRS +mrs-geographiclib-datasets: + ubuntu: [mrs-geographiclib-datasets] +mrs-uav-shell-additions: + ubuntu: [mrs-uav-shell-additions] +coppelia-sim-edu: + ubuntu: [coppelia-sim-edu] + +# other dependencies +python3-jinja2: + ubuntu: [python3-jinja2] +python-is-python3: + ubuntu: [python-is-python3] +tmuxinator: + ubuntu: [tmuxinator] diff --git a/resources/scripts/add_ppa.sh b/resources/scripts/add_ppa.sh new file mode 100755 index 00000000..6b6c6644 --- /dev/null +++ b/resources/scripts/add_ppa.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR + +echo "$0: Adding MRS Testing PPA repository" + +sudo apt-get -y install curl gpg dpkg-dev + +ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) + +curl -s --compressed "https://ctu-mrs.github.io/ppa-testing/ctu-mrs.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/ctu-mrs.gpg >/dev/null +sudo curl -s --compressed -o /etc/apt/sources.list.d/ctu-mrs-testing.list "https://ctu-mrs.github.io/ppa-testing/ctu-mrs-apt.list" +sudo curl -s --compressed -o /etc/apt/preferences.d/ctu-mrs-testing-preferences "https://ctu-mrs.github.io/ppa-testing/ctu-mrs-ppa-preferences.txt" +sudo curl -s --compressed -o /etc/ros/rosdep/sources.list.d/ctu-mrs-testing.list "https://ctu-mrs.github.io/ppa-testing/ctu-mrs-$ARCH.list" +sudo apt-get -y update + +rosdep update + +echo "$0: Finished adding MRS Testing PPA repository" diff --git a/resources/scripts/add_ros_ppa.sh b/resources/scripts/add_ros_ppa.sh new file mode 100755 index 00000000..67f167fd --- /dev/null +++ b/resources/scripts/add_ros_ppa.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR + +echo "$0: Adding ROS PPA" + +sudo apt-get -y install wget lsb-release gnupg curl sudo + +sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' + +curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - + +sudo apt-get -y update + +sudo apt-get -y install python3-pip + +sudo pip3 install -U rosdep + +sudo rosdep init || echo "$0: rosdep already initialized" +rosdep update + +echo "$0: ROS PPA added" diff --git a/resources/scripts/remove_ppa.sh b/resources/scripts/remove_ppa.sh new file mode 100755 index 00000000..3fcf8d0a --- /dev/null +++ b/resources/scripts/remove_ppa.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "$0: Removing MRS Testing PPA repository" + +sudo rm /etc/apt/sources.list.d/ctu-mrs-testing.list +sudo rm /etc/apt/preferences.d/ctu-mrs-testing-preferences +sudo rm /etc/ros/rosdep/sources.list.d/ctu-mrs-testing.list + +sudo apt-get -y update +rosdep update + +echo "$0: Finished removing MRS Testing PPA repository"