Skip to content

Commit

Permalink
package_creatio: version with only docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Jan 7, 2021
1 parent 5c016e1 commit 4edfbec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 87 deletions.
11 changes: 5 additions & 6 deletions .ci/create_icub-main_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ __PLATFORM_RELEASE=""
_PLATFORM_HARDWARE=""
_CONTROL_FILE=""
ICUB_SCRIPT_DIR=$(pwd)
ICUB_REPO_URL="https://github.com/robotology/icub-main.git"


# #####################################################
Expand Down Expand Up @@ -334,13 +335,11 @@ install_deps()

build_icub() {

#echo "Cloning icub sources from ${ICUB_REPO_URL}"
#git clone $ICUB_REPO_URL
#if [ "$?" != "0" ]; then
# echo "Error: unable to clone icub repositoy from ${ICUB_REPO_URL}"
# exit 1
#fi
echo "Cloning icub sources from ${ICUB_REPO_URL}"

cd ${ICUB_SCRIPT_DIR}
git clone $ICUB_REPO_URL
cd icub-main
export D_ICUB_ROOT=$(pwd)
git checkout v$ICUB_PACKAGE_VERSION
if [ "$?" != "0" ]; then
Expand Down
89 changes: 8 additions & 81 deletions .github/workflows/packages_creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,78 +33,13 @@ jobs:
path: ./ICUB_PACKAGE_VERSION.txt

# end job "preliminary-steps"
# start job "normal-build"
normal-build:
name: "[packages:@${{ matrix.os }}]"
needs: [preliminary-steps]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
steps:

- name: install deps
shell: bash
run: |
sudo apt update
sudo apt install -y git
sudo apt install -y lsb-release
sudo apt install -y build-essential
sudo apt install -y qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings libopenni2-dev libi2c-dev libv4l-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-tools libgraphviz-dev libqcustomplot-dev
- uses: actions/checkout@master

- uses: actions/download-artifact@v2
with:
name: ICUB_PACKAGE_VERSION.txt

- name: Generate icub-common metapackage
id: package_generation_icub-common
shell: bash
run: |
chmod +x ./.ci/create_icub-common_deb.sh
export ICUB_PACKAGE_VERSION=$(cat ICUB_PACKAGE_VERSION.txt)
./.ci/create_icub-common_deb.sh
echo ::set-output name=ICUB_COMMON_PACKAGE_NAME::$( cat ICUB_COMMON_PACKAGE_NAME.txt )
- name: Upload Release Asset icub-common
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.package_generation_icub-common.outputs.ICUB_COMMON_PACKAGE_NAME }}
asset_name: ${{ steps.package_generation_icub-common.outputs.ICUB_COMMON_PACKAGE_NAME }}
asset_content_type: application/vnd.debian.binary-package

- name: Generate icub package
id: package_generation_icub-main
shell: bash
run: |
chmod +x ./.ci/create_icub-main_deb.sh
export ICUB_PACKAGE_VERSION=$(cat ICUB_PACKAGE_VERSION.txt)
./.ci/create_icub-main_deb.sh
echo ::set-output name=ICUB_MAIN_PACKAGE_NAME::$( cat ICUB_MAIN_PACKAGE_NAME.txt )
- name: Upload Release Asset icub-main
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.package_generation_icub-main.outputs.ICUB_MAIN_PACKAGE_NAME }}
asset_name: ${{ steps.package_generation_icub-main.outputs.ICUB_MAIN_PACKAGE_NAME }}
asset_content_type: application/vnd.debian.binary-package
# end job "normal-build"
# start job "docker-build"
docker-build:
name: '[packages:@${{ matrix.docker_image }}]'
needs: [normal-build]
needs: [preliminary-steps]
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: true
matrix:
docker_image:
- "debian:buster"
Expand All @@ -120,9 +55,11 @@ jobs:
apt update
apt install -y git
apt install -y lsb-release
apt install -y build-essential wget
apt install -y build-essential wget software-properties-common
apt install -y libsqlite3-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings libopenni2-dev libi2c-dev libv4l-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-tools libgraphviz-dev libqcustomplot-dev
env:
TZ: Italy/Rome
DEBIAN_FRONTEND: noninteractive
- uses: actions/checkout@master

- uses: actions/download-artifact@v2
Expand All @@ -146,21 +83,12 @@ jobs:
./.ci/create_icub-main_deb.sh
echo ::set-output name=ICUB_MAIN_PACKAGE_NAME::$( cat ICUB_MAIN_PACKAGE_NAME.txt )
- uses: actions/download-artifact@v2
with:
name: UPLOAD_URL.txt

- name: read upload url
id: read_upload_url
shell: bash
run: echo ::set-output name=UPLOAD_URL::$( cat UPLOAD_URL.txt )

- name: Upload Release asset icub-common
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.read_upload_url.outputs.UPLOAD_URL }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.package_generation_icub-common.outputs.ICUB_COMMON_PACKAGE_NAME }}
asset_name: ${{ steps.package_generation_icub-common.outputs.ICUB_COMMON_PACKAGE_NAME }}
asset_content_type: application/vnd.debian.binary-package
Expand All @@ -169,7 +97,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.read_upload_url.outputs.UPLOAD_URL }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.package_generation_icub-main.outputs.ICUB_MAIN_PACKAGE_NAME }}
asset_name: ${{ steps.package_generation_icub-main.outputs.ICUB_MAIN_PACKAGE_NAME }}
asset_content_type: application/vnd.debian.binary-package
Expand All @@ -187,6 +115,5 @@ jobs:
with:
name: |
ICUB_PACKAGE_VERSION.txt
UPLOAD_URL.txt
# end job "clenup-steps"

0 comments on commit 4edfbec

Please sign in to comment.