-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci/packaging] Enable GitHub Actions
- Loading branch information
Showing
29 changed files
with
519 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# git-build-recipe format 0.4 deb-version {debversion}+{time}+{git-commit} | ||
https://github.com/jrl-umi3218/Tasks @REF@ | ||
run git submodule update --init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: CI of Tasks | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
clang-format: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install clang-format-6.0 | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get -qq remove clang-6.0 libclang1-6.0 libclang-common-6.0-dev libllvm6.0 | ||
sudo apt-get -qq install clang-format-6.0 clang-format | ||
- name: Run clang-format-check | ||
run: | | ||
./.clang-format-check.sh | ||
build: | ||
needs: clang-format | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest] | ||
build-type: [Debug, RelWithDebInfo] | ||
compiler: [gcc, clang] | ||
exclude: | ||
# Only default compiler on macos-latest and windows-latest | ||
- os: macos-latest | ||
compiler: clang | ||
- os: windows-latest | ||
compiler: clang | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: recursive | ||
- name: Install dependencies | ||
uses: jrl-umi3218/github-actions/install-dependencies@master | ||
with: | ||
compiler: ${{ matrix.compiler }} | ||
build-type: ${{ matrix.build-type }} | ||
ubuntu: | | ||
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 | ||
macos: | | ||
cask: gfortran | ||
brew: eigen boost | ||
pip: Cython coverage nose numpy | ||
windows: | | ||
pip: Cython coverage nose numpy | ||
github: | ||
- path: eigenteam/eigen-git-mirror | ||
ref: 3.3.7 | ||
github: | | ||
- path: jrl-umi3218/Eigen3ToPython | ||
- path: jrl-umi3218/SpaceVecAlg | ||
- path: jrl-umi3218/sch-core | ||
- path: jrl-umi3218/eigen-qld | ||
- path: jrl-umi3218/sch-core-python | ||
- path: jrl-umi3218/RBDyn | ||
- name: Build and test | ||
uses: jrl-umi3218/github-actions/build-cmake-project@master | ||
with: | ||
compiler: ${{ matrix.compiler }} | ||
build-type: ${{ matrix.build-type }} | ||
- name: Upload documentation | ||
# Only run on master branch and for one configuration | ||
if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master' | ||
uses: jrl-umi3218/github-actions/upload-documentation@master | ||
with: | ||
GH_USER: gergondet | ||
GH_PAGES_TOKEN: ${{ secrets.GH_PAGES_TOKEN }} | ||
- name: Slack Notification | ||
if: failure() | ||
uses: archive/github-actions-slack@master | ||
with: | ||
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
slack-channel: '#ci' | ||
slack-text: > | ||
[Tasks] Build *${{ matrix.os }}/${{ matrix.build-type }}* failed on ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
name: Package Tasks | ||
|
||
# This workflow only runs when pushing to master or pushing a tag | ||
# | ||
# On master, it will: | ||
# - Build packages for selected Debian/Ubuntu distro | ||
# - Upload the packages to https://dl.bintray.com/gergondet/multi-contact-head | ||
# | ||
# 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 | ||
# - Finalize the release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
# For a given tag vX.Y.Z, this checks: | ||
# - set(PROJECT_VERSION X.Y.Z) in CMakeLists.txt | ||
# - version X.Y.Z in debian/changelog | ||
# If these checks fail, the tag is automatically deleted | ||
# | ||
# This job does not run on the master branch | ||
check-tag: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: recursive | ||
if: github.ref != 'refs/heads/master' | ||
- name: Check version coherency | ||
run: | | ||
set -x | ||
export VERSION=`echo ${{ github.ref }} | sed -e 's@refs/tags/v@@'` | ||
echo "::set-env name=REJECTION::PROJECT_VERSION in CMakeLists.txt does not match tag" | ||
grep -q "set(PROJECT_VERSION ${VERSION})" CMakeLists.txt | ||
echo "::set-env name=REJECTION::Upstream version in debian/changelog does not match tag" | ||
head -n 1 debian/changelog | grep -q "tasks (${VERSION}" | ||
echo "::set-env name=REJECTION::" | ||
export TAG=`echo ${{ github.ref }} | sed -e 's@refs/tags/@@'` | ||
echo "::set-env name=RELEASE_TAG::${TAG}" | ||
if: github.ref != 'refs/heads/master' | ||
- name: Delete tag | ||
run: | | ||
set -x | ||
curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X DELETE https://api.github.com/repos/${{ github.repository }}/git/${{ github.ref }} | ||
if: failure() | ||
- name: Notify tag deletion | ||
uses: archive/github-actions-slack@master | ||
with: | ||
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
slack-channel: '#ci' | ||
slack-text: > | ||
Tag *${{ github.ref }}* in *${{ github.repository }}* was deleted: | ||
${{ env.REJECTION}} | ||
if: failure() | ||
- name: Create release | ||
uses: jrl-umi3218/github-actions/create-release@master | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ env.RELEASE_TAG }} | ||
if: github.ref != 'refs/heads/master' | ||
# This job build binary packages for Ubuntu | ||
build-packages: | ||
needs: check-tag | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dist: [xenial, bionic, focal] | ||
arch: [i386, amd64] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Prepare recipe | ||
run: | | ||
set -x | ||
cp .github/workflows/Tasks.recipe /tmp/Tasks.recipe | ||
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'` | ||
sed -i "s#@REF@#${REF}#" /tmp/Tasks.recipe | ||
if [ $REF == "master" ] | ||
then | ||
echo "::set-env name=EXTRA_MIRROR::https://dl.bintray.com/gergondet/multi-contact-head" | ||
else | ||
echo "::set-env name=EXTRA_MIRROR::https://dl.bintray.com/gergondet/multi-contact-release" | ||
fi | ||
echo "Prepared recipe" | ||
echo "###############" | ||
cat /tmp/Tasks.recipe | ||
- name: Build package | ||
uses: jrl-umi3218/github-actions/build-package@master | ||
with: | ||
dist: ${{ matrix.dist }} | ||
arch: ${{ matrix.arch }} | ||
recipe: /tmp/Tasks.recipe | ||
other-mirrors: ${{ env.EXTRA_MIRROR }} | ||
other-gpg-keys: "0x892EA6EE273707C6495A6FB6220D644C64666806" | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: packages-${{ matrix.dist }}-${{ matrix.arch }} | ||
path: /tmp/packages-${{ matrix.dist }}-${{ matrix.arch }}/ | ||
# This job upload binary packages for Ubuntu | ||
upload-packages: | ||
needs: build-packages | ||
strategy: | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
dist: [xenial, bionic, focal] | ||
arch: [i386, amd64] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Set upload parameters | ||
run: | | ||
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'` | ||
if [ $REF == "master" ] | ||
then | ||
echo "::set-env name=BINTRAY_REPO::multi-contact-head" | ||
echo "::set-env name=BINTRAY_VERSION::HEAD" | ||
else | ||
echo "::set-env name=BINTRAY_REPO::multi-contact-release" | ||
echo "::set-env name=BINTRAY_VERSION::${REF}" | ||
fi | ||
- name: Download packages | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: packages-${{ matrix.dist }}-${{ matrix.arch }} | ||
- 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 contorl for kinematics tree and list of kinematics tree" | ||
licenses: [BSD 2-Clause] | ||
vcs_url: https://github.com/jrl-umi3218/Tasks | ||
version: ${{ env.BINTRAY_VERSION }} | ||
path: packages-${{ matrix.dist }}-${{ matrix.arch }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "cmake"] | ||
path = cmake | ||
url = https://github.com/jrl-umi3218/jrl-cmakemodules | ||
[submodule ".travis"] | ||
path = .travis | ||
url = https://github.com/jrl-umi3218/jrl-travis |
Submodule .travis
deleted from
62b07d
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.