Skip to content

Commit f3f5451

Browse files
committed
[ci/packaging] Enable GitHub Actions
1 parent 33f6b29 commit f3f5451

29 files changed

+519
-111
lines changed

.github/workflows/Tasks.recipe

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# git-build-recipe format 0.4 deb-version {debversion}+{time}+{git-commit}
2+
https://github.com/jrl-umi3218/Tasks @REF@
3+
run git submodule update --init

.github/workflows/build.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: CI of Tasks
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
13+
clang-format:
14+
runs-on: ubuntu-18.04
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Install clang-format-6.0
18+
run: |
19+
sudo apt-get -qq update
20+
sudo apt-get -qq remove clang-6.0 libclang1-6.0 libclang-common-6.0-dev libllvm6.0
21+
sudo apt-get -qq install clang-format-6.0 clang-format
22+
- name: Run clang-format-check
23+
run: |
24+
./.clang-format-check.sh
25+
26+
build:
27+
needs: clang-format
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest]
32+
build-type: [Debug, RelWithDebInfo]
33+
compiler: [gcc, clang]
34+
exclude:
35+
# Only default compiler on macos-latest and windows-latest
36+
- os: macos-latest
37+
compiler: clang
38+
- os: windows-latest
39+
compiler: clang
40+
41+
runs-on: ${{ matrix.os }}
42+
steps:
43+
- uses: actions/checkout@v1
44+
with:
45+
submodules: recursive
46+
- name: Install dependencies
47+
uses: jrl-umi3218/github-actions/install-dependencies@master
48+
with:
49+
compiler: ${{ matrix.compiler }}
50+
build-type: ${{ matrix.build-type }}
51+
ubuntu: |
52+
apt: cython cython3 python-nose python3-nose python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools libeigen3-dev doxygen doxygen-latex libboost-all-dev
53+
macos: |
54+
cask: gfortran
55+
brew: eigen boost
56+
pip: Cython coverage nose numpy
57+
windows: |
58+
pip: Cython coverage nose numpy
59+
github:
60+
- path: eigenteam/eigen-git-mirror
61+
ref: 3.3.7
62+
github: |
63+
- path: jrl-umi3218/Eigen3ToPython
64+
- path: jrl-umi3218/SpaceVecAlg
65+
- path: jrl-umi3218/sch-core
66+
- path: jrl-umi3218/eigen-qld
67+
- path: jrl-umi3218/sch-core-python
68+
- path: jrl-umi3218/RBDyn
69+
- name: Build and test
70+
uses: jrl-umi3218/github-actions/build-cmake-project@master
71+
with:
72+
compiler: ${{ matrix.compiler }}
73+
build-type: ${{ matrix.build-type }}
74+
- name: Upload documentation
75+
# Only run on master branch and for one configuration
76+
if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master'
77+
uses: jrl-umi3218/github-actions/upload-documentation@master
78+
with:
79+
GH_USER: gergondet
80+
GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
81+
- name: Slack Notification
82+
if: failure()
83+
uses: archive/github-actions-slack@master
84+
with:
85+
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
86+
slack-channel: '#ci'
87+
slack-text: >
88+
[Tasks] Build *${{ matrix.os }}/${{ matrix.build-type }}* failed on ${{ github.ref }}

.github/workflows/package.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Package Tasks
2+
3+
# This workflow only runs when pushing to master or pushing a tag
4+
#
5+
# On master, it will:
6+
# - Build packages for selected Debian/Ubuntu distro
7+
# - Upload the packages to https://dl.bintray.com/gergondet/multi-contact-head
8+
#
9+
# On tagged versions it will:
10+
# - Create a GitHub release draft
11+
# - Attach the sources to the release
12+
# - Build packages for selected Debian/Ubuntu distro
13+
# - Upload the packages to https://dl.bintray.com/gergondet/multi-contact
14+
# - Finalize the release
15+
16+
on:
17+
push:
18+
branches:
19+
- master
20+
tags:
21+
- v*
22+
23+
jobs:
24+
# For a given tag vX.Y.Z, this checks:
25+
# - set(PROJECT_VERSION X.Y.Z) in CMakeLists.txt
26+
# - version X.Y.Z in debian/changelog
27+
# If these checks fail, the tag is automatically deleted
28+
#
29+
# This job does not run on the master branch
30+
check-tag:
31+
runs-on: ubuntu-18.04
32+
steps:
33+
- uses: actions/checkout@v1
34+
with:
35+
submodules: recursive
36+
if: github.ref != 'refs/heads/master'
37+
- name: Check version coherency
38+
run: |
39+
set -x
40+
export VERSION=`echo ${{ github.ref }} | sed -e 's@refs/tags/v@@'`
41+
echo "::set-env name=REJECTION::PROJECT_VERSION in CMakeLists.txt does not match tag"
42+
grep -q "set(PROJECT_VERSION ${VERSION})" CMakeLists.txt
43+
echo "::set-env name=REJECTION::Upstream version in debian/changelog does not match tag"
44+
head -n 1 debian/changelog | grep -q "tasks (${VERSION}"
45+
echo "::set-env name=REJECTION::"
46+
export TAG=`echo ${{ github.ref }} | sed -e 's@refs/tags/@@'`
47+
echo "::set-env name=RELEASE_TAG::${TAG}"
48+
if: github.ref != 'refs/heads/master'
49+
- name: Delete tag
50+
run: |
51+
set -x
52+
curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X DELETE https://api.github.com/repos/${{ github.repository }}/git/${{ github.ref }}
53+
if: failure()
54+
- name: Notify tag deletion
55+
uses: archive/github-actions-slack@master
56+
with:
57+
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
58+
slack-channel: '#ci'
59+
slack-text: >
60+
Tag *${{ github.ref }}* in *${{ github.repository }}* was deleted:
61+
${{ env.REJECTION}}
62+
if: failure()
63+
- name: Create release
64+
uses: jrl-umi3218/github-actions/create-release@master
65+
with:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
tag: ${{ env.RELEASE_TAG }}
68+
if: github.ref != 'refs/heads/master'
69+
# This job build binary packages for Ubuntu
70+
build-packages:
71+
needs: check-tag
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
dist: [xenial, bionic, focal]
76+
arch: [i386, amd64]
77+
runs-on: ubuntu-18.04
78+
steps:
79+
- uses: actions/checkout@v1
80+
- name: Prepare recipe
81+
run: |
82+
set -x
83+
cp .github/workflows/Tasks.recipe /tmp/Tasks.recipe
84+
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'`
85+
sed -i "s#@REF@#${REF}#" /tmp/Tasks.recipe
86+
if [ $REF == "master" ]
87+
then
88+
echo "::set-env name=EXTRA_MIRROR::https://dl.bintray.com/gergondet/multi-contact-head"
89+
else
90+
echo "::set-env name=EXTRA_MIRROR::https://dl.bintray.com/gergondet/multi-contact-release"
91+
fi
92+
echo "Prepared recipe"
93+
echo "###############"
94+
cat /tmp/Tasks.recipe
95+
- name: Build package
96+
uses: jrl-umi3218/github-actions/build-package@master
97+
with:
98+
dist: ${{ matrix.dist }}
99+
arch: ${{ matrix.arch }}
100+
recipe: /tmp/Tasks.recipe
101+
other-mirrors: ${{ env.EXTRA_MIRROR }}
102+
other-gpg-keys: "0x892EA6EE273707C6495A6FB6220D644C64666806"
103+
- uses: actions/upload-artifact@v1
104+
with:
105+
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
106+
path: /tmp/packages-${{ matrix.dist }}-${{ matrix.arch }}/
107+
# This job upload binary packages for Ubuntu
108+
upload-packages:
109+
needs: build-packages
110+
strategy:
111+
max-parallel: 1
112+
fail-fast: false
113+
matrix:
114+
dist: [xenial, bionic, focal]
115+
arch: [i386, amd64]
116+
runs-on: ubuntu-18.04
117+
steps:
118+
- name: Set upload parameters
119+
run: |
120+
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'`
121+
if [ $REF == "master" ]
122+
then
123+
echo "::set-env name=BINTRAY_REPO::multi-contact-head"
124+
echo "::set-env name=BINTRAY_VERSION::HEAD"
125+
else
126+
echo "::set-env name=BINTRAY_REPO::multi-contact-release"
127+
echo "::set-env name=BINTRAY_VERSION::${REF}"
128+
fi
129+
- name: Download packages
130+
uses: actions/download-artifact@v1
131+
with:
132+
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
133+
- name: Upload
134+
uses: jrl-umi3218/github-actions/upload-package@master
135+
with:
136+
dist: ${{ matrix.dist }}
137+
arch: ${{ matrix.arch }}
138+
subject: gergondet
139+
repo: ${{ env.BINTRAY_REPO }}
140+
package: |
141+
name: Tasks
142+
desc: "Real-time contorl for kinematics tree and list of kinematics tree"
143+
licenses: [BSD 2-Clause]
144+
vcs_url: https://github.com/jrl-umi3218/Tasks
145+
version: ${{ env.BINTRAY_VERSION }}
146+
path: packages-${{ matrix.dist }}-${{ matrix.arch }}
147+
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
148+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "cmake"]
22
path = cmake
33
url = https://github.com/jrl-umi3218/jrl-cmakemodules
4-
[submodule ".travis"]
5-
path = .travis
6-
url = https://github.com/jrl-umi3218/jrl-travis

.travis

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ Tasks
22
=====
33

44
[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
5-
[![Build Status](https://travis-ci.org/jrl-umi3218/Tasks.svg?branch=master)](https://travis-ci.org/jrl-umi3218/Tasks)
6-
[![AppVeyor status](https://ci.appveyor.com/api/projects/status/kteqpch13y0ac3wq/branch/master?svg=true)](https://ci.appveyor.com/project/gergondet/tasks/branch/master)
75
[ ![Download](https://api.bintray.com/packages/gergondet/multi-contact/Tasks%3Agergondet/images/download.svg) ](https://bintray.com/gergondet/multi-contact/Tasks%3Agergondet/_latestVersion)
6+
[![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)
87
[![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)
98

109
Tasks is library for real time control of robots and kinematic trees using constrained optimization.
@@ -38,13 +37,21 @@ An online documentation can be found [online](https://jrl-umi3218.github.io/Task
3837
Installing
3938
----------
4039

41-
## Ubuntu LITS (14.04, 16.04, 18.04): PPA
40+
## Ubuntu LTS (16.04, 18.04, 20.04)
4241

43-
Use the [multi-contact-unstable](https://launchpad.net/~pierre-gergondet+ppa/+archive/ubuntu/multi-contact-unstable) ppa:
4442
```bash
45-
sudo add-apt-repository ppa:pierre-gergondet+ppa/multi-contact-unstable
46-
sudo apt-get update
47-
sudo apt-get install libtasks-dev libtasks-qld-doc python-tasks-qld python3-tasks-qld
43+
# Make sure you have required tools
44+
sudo apt install apt-transport-https lsb-release ca-certificates gnupg
45+
# Add our key
46+
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 892EA6EE273707C6495A6FB6220D644C64666806
47+
# Add our repository (stable versions)
48+
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'
49+
# Use this to setup the HEAD version
50+
# 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'
51+
# Update packages list
52+
sudo apt update
53+
# Install packages
54+
sudo apt install libtasks-dev python-tasks python3-tasks
4855
```
4956

5057
## Homebrew OS X install

appveyor.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)