Skip to content

Commit

Permalink
[ci] Upload to cloudsmith
Browse files Browse the repository at this point in the history
  • Loading branch information
gergondet committed Apr 27, 2021
1 parent 3875cbd commit cfc91b5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 93 deletions.
49 changes: 11 additions & 38 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,10 @@ jobs:
fi
if $USE_HEAD
then
echo "BINTRAY_REPO=multi-contact-head" >> $GITHUB_ENV
echo "BINTRAY_VERSION=HEAD" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-head" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "BINTRAY_REPO=multi-contact-release" >> $GITHUB_ENV
echo "BINTRAY_VERSION=${REF}" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-release" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
Expand All @@ -118,8 +114,7 @@ jobs:
with:
dist: "${{ matrix.dist }}"
arch: "${{ matrix.arch }}"
other-mirrors: "${{ env.EXTRA_MIRROR }}"
other-gpg-keys: '0x892EA6EE273707C6495A6FB6220D644C64666806'
cloudsmith-repo: "${{ env.CLOUDSMITH_REPO }}"
- uses: actions/upload-artifact@v1
with:
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
Expand Down Expand Up @@ -172,14 +167,10 @@ jobs:
fi
if $USE_HEAD
then
echo "BINTRAY_REPO=multi-contact-head" >> $GITHUB_ENV
echo "BINTRAY_VERSION=HEAD" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-head" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "BINTRAY_REPO=multi-contact-release" >> $GITHUB_ENV
echo "BINTRAY_VERSION=${REF}" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-release" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
Expand All @@ -191,19 +182,10 @@ jobs:
- name: Upload
uses: jrl-umi3218/github-actions/upload-package@master
with:
dist: "${{ matrix.dist }}"
arch: "${{ matrix.arch }}"
subject: gergondet
repo: "${{ env.BINTRAY_REPO }}"
package: |
name: Tasks
desc: "Real-time control for kinematics tree and list of kinematics tree"
licenses: [BSD 2-Clause]
vcs_url: https://github.com/jrl-umi3218/Tasks
version: "${{ env.BINTRAY_VERSION }}"
dist: ubuntu/${{ matrix.dist }}
repo: "${{ env.CLOUDSMITH_REPO }}"
path: packages-${{ matrix.dist }}-${{ matrix.arch }}
BINTRAY_API_KEY: "${{ secrets.BINTRAY_API_KEY }}"
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
CLOUDSMITH_API_KEY: "${{ secrets.CLOUDSMITH_API_KEY }}"
if: env.PACKAGE_UPLOAD == 'true'
mirror-sync-and-trigger:
needs: upload-packages
Expand Down Expand Up @@ -238,24 +220,15 @@ jobs:
fi
if $USE_HEAD
then
echo "BINTRAY_REPO=multi-contact-head" >> $GITHUB_ENV
echo "BINTRAY_VERSION=HEAD" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-head" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "BINTRAY_REPO=multi-contact-release" >> $GITHUB_ENV
echo "BINTRAY_VERSION=${REF}" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-release" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
- name: Request mirror sync
run: 'curl -ugergondet:${{ secrets.BINTRAY_API_KEY }} --header "X-GPG-PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}" -X POST https://api.bintray.com/calc_metadata/gergondet/${{ env.BINTRAY_REPO }}
'
if: env.PACKAGE_UPLOAD == 'true'
- name: Trigger dependents rebuild
run: 'curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.GH_PAGES_TOKEN }}" --request POST --data "{\"event_type\": \"${PACKAGE_JOB}\"}" https://api.github.com/repos/jrl-umi3218/mc_rtc/dispatches
'
'
if: env.PACKAGE_UPLOAD == 'true'
34 changes: 8 additions & 26 deletions .github/workflows/sources/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: Package Tasks
#
# On master, it will additionally:
# - Build packages for selected Debian/Ubuntu distro
# - Upload the packages to https://dl.bintray.com/gergondet/multi-contact-head
# - Upload the packages to https://cloudsmith.io/~mc-rtc/repos/head/packages/
#
# On tagged versions it will:
# - Create a GitHub release draft
# - Attach the sources to the release
# - Build packages for selected Debian/Ubuntu distro
# - Upload the packages to https://dl.bintray.com/gergondet/multi-contact
# - Upload the packages to https://cloudsmith.io/~mc-rtc/repos/stable/packages/
#
# On package-master trigger, it will rebuild and upload the latest master package
#
Expand Down Expand Up @@ -122,14 +122,10 @@ jobs:
fi
if $USE_HEAD
then
echo "BINTRAY_REPO=multi-contact-head" >> $GITHUB_ENV
echo "BINTRAY_VERSION=HEAD" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-head" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "BINTRAY_REPO=multi-contact-release" >> $GITHUB_ENV
echo "BINTRAY_VERSION=${REF}" >> $GITHUB_ENV
echo "EXTRA_MIRROR=https://dl.bintray.com/gergondet/multi-contact-release" >> $GITHUB_ENV
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
Expand All @@ -138,8 +134,7 @@ jobs:
with:
dist: ${{ matrix.dist }}
arch: ${{ matrix.arch }}
other-mirrors: ${{ env.EXTRA_MIRROR }}
other-gpg-keys: "0x892EA6EE273707C6495A6FB6220D644C64666806"
cloudsmith-repo: ${{ env.CLOUDSMITH_REPO }}
- uses: actions/upload-artifact@v1
with:
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
Expand Down Expand Up @@ -167,19 +162,10 @@ jobs:
- name: Upload
uses: jrl-umi3218/github-actions/upload-package@master
with:
dist: ${{ matrix.dist }}
arch: ${{ matrix.arch }}
subject: gergondet
repo: ${{ env.BINTRAY_REPO }}
package: |
name: Tasks
desc: "Real-time control for kinematics tree and list of kinematics tree"
licenses: [BSD 2-Clause]
vcs_url: https://github.com/jrl-umi3218/Tasks
version: ${{ env.BINTRAY_VERSION }}
dist: ubuntu/${{ matrix.dist }}
repo: ${{ env.CLOUDSMITH_REPO }}
path: packages-${{ matrix.dist }}-${{ matrix.arch }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
if: env.PACKAGE_UPLOAD == 'true'
# This job triggers a mirror sync and dependent rebuilds
mirror-sync-and-trigger:
Expand All @@ -191,10 +177,6 @@ jobs:
submodules: recursive
- name: Set repository parameters
<<: *choose-extra-mirror
- name: Request mirror sync
run: |
curl -ugergondet:${{ secrets.BINTRAY_API_KEY }} --header "X-GPG-PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}" -X POST https://api.bintray.com/calc_metadata/gergondet/${{ env.BINTRAY_REPO }}
if: env.PACKAGE_UPLOAD == 'true'
- name: Trigger dependents rebuild
run: |
curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.GH_PAGES_TOKEN }}" --request POST --data "{\"event_type\": \"${PACKAGE_JOB}\"}" https://api.github.com/repos/jrl-umi3218/mc_rtc/dispatches
Expand Down
48 changes: 19 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Tasks
=====

[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
[ ![Download](https://api.bintray.com/packages/gergondet/multi-contact/Tasks%3Amulti-contact/images/download.svg) ](https://bintray.com/gergondet/multi-contact/Tasks%3Amulti-contact/_latestVersion)
[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith)](https://cloudsmith.com)
[![CI](https://github.com/jrl-umi3218/Tasks/workflows/CI%20of%20Tasks/badge.svg?branch=master)](https://github.com/jrl-umi3218/Tasks/actions?query=workflow%3A%22CI+of+Tasks%22)
[![Documentation](https://img.shields.io/badge/doxygen-online-brightgreen?logo=read-the-docs&style=flat)](http://jrl-umi3218.github.io/Tasks/doxygen/HEAD/index.html)

Expand Down Expand Up @@ -39,18 +39,25 @@ Installing

## Ubuntu LTS (16.04, 18.04, 20.04)

You must first setup our package mirror:

```
curl -1sLf \
'https://dl.cloudsmith.io/public/mc-rtc/stable/setup.deb.sh' \
| sudo -E bash
```

You can also choose the head mirror which will have the latest version of this package:

```
curl -1sLf \
'https://dl.cloudsmith.io/public/mc-rtc/stable/setup.deb.sh' \
| sudo -E bash
```

You can then install the package:

```bash
# Make sure you have required tools
sudo apt install apt-transport-https lsb-release ca-certificates gnupg
# Add our key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 892EA6EE273707C6495A6FB6220D644C64666806
# Add our repository (stable versions)
sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-release $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
# Use this to setup the HEAD version
# sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-head $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
# Update packages list
sudo apt update
# Install packages
sudo apt install libtasks-dev python-tasks python3-tasks
```

Expand All @@ -66,23 +73,6 @@ conan install Tasks/latest@multi-contact/stable
# conan install Tasks/latest@multi-contact/dev
```

## Homebrew OS X install

Install from the command line using [Homebrew](brew.sh):

```bash
# install homebrew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install caskroom application manager
brew install caskroom/cask/brew-cask
# tap homebrew-science package repository
brew tap homebrew/science
# tap ahundt-robotics repository
brew tap ahundt/robotics
# install tasks and all its dependencies
brew install tasks
```

## Manually build from source

### Dependencies
Expand Down

0 comments on commit cfc91b5

Please sign in to comment.