Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Aikido to Github Actions #598

Merged
merged 16 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .ci/after_failure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

set -ex

cd "${HOME}/workspace"

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cat ./build/aikido/Testing/Temporary/LastTest.log
cat ./build/aikido/Testing/Temporary/LastTestsFailed.log
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
cat Testing/Temporary/LastTest.log
cat Testing/Temporary/LastTestsFailed.log
if [ "${USE_CATKIN}" = "ON" ]; then
cd "${HOME}/workspace/build/aikido/"
fi

cat Testing/Temporary/LastTest.log
cat Testing/Temporary/LastTestsFailed.log
9 changes: 0 additions & 9 deletions .ci/after_script.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
set -ex

if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/before_install_catkin.sh";
. "${GITHUB_WORKSPACE}/.ci/before_install_catkin.sh";
fi
2 changes: 1 addition & 1 deletion .ci/before_install_catkin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ set -ex
# Install test fixture dependencies.
mkdir -p "${HOME}/workspace/src"
cd "${HOME}/workspace"
git clone https://github.com/personalrobotics/pr-cleanroom.git scripts
git clone https://github.com/personalrobotics/pr-cleanroom.git -b master scripts
curl -sS "${DISTRIBUTION}" > distribution.yml
./scripts/internal-setup.sh
13 changes: 7 additions & 6 deletions .ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ AIKIDO_DIR="${HOME}/workspace/src/aikido"
# For branch builds, Travis only clones that branch with a fixed depth of 50
# commits. This means that the clone knows nothing about other Git branches or
# tags. We fix this by deleting and re-cloning the full repository.
# TODO: Unsure if we still need to do this for Github Actions
rm -rf ${AIKIDO_DIR}
git clone "https://github.com/${TRAVIS_REPO_SLUG}.git" ${AIKIDO_DIR}
git clone "https://github.com/${GITHUB_REPOSITORY}.git" ${AIKIDO_DIR}

# Organize into "gh-pages" directory
mkdir -p ${TRAVIS_BUILD_DIR}/gh-pages
mkdir -p ${GITHUB_WORKSPACE}/gh-pages

# Initialize list of API versions
cat <<EOF > ${TRAVIS_BUILD_DIR}/gh-pages/README.md
cat <<EOF > ${GITHUB_WORKSPACE}/gh-pages/README.md
## API Documentation

EOF
Expand All @@ -27,12 +28,12 @@ cd build_docs

while read version; do
# Add entry to list of API versions
echo "* [${version}](https://personalrobotics.github.io/aikido/${version}/)" >> ${TRAVIS_BUILD_DIR}/gh-pages/README.md
echo "* [${version}](https://personalrobotics.github.io/aikido/${version}/)" >> ${GITHUB_WORKSPACE}/gh-pages/README.md

# Build documentation
git -C ${AIKIDO_DIR} checkout ${version}
rm -rf *
cmake -DDOWNLOAD_TAGFILES=ON ${AIKIDO_DIR}
make docs
mv doxygen ${TRAVIS_BUILD_DIR}/gh-pages/${version}
done < ${TRAVIS_BUILD_DIR}/.ci/docs_versions.txt
mv doxygen ${GITHUB_WORKSPACE}/gh-pages/${version}
done < ${GITHUB_WORKSPACE}/.ci/docs_versions.txt
17 changes: 0 additions & 17 deletions .ci/docker/env.list

This file was deleted.

21 changes: 0 additions & 21 deletions .ci/docker/ubuntu-bionic

This file was deleted.

21 changes: 0 additions & 21 deletions .ci/docker/ubuntu-focal

This file was deleted.

13 changes: 0 additions & 13 deletions .ci/docker/ubuntu-trusty

This file was deleted.

13 changes: 0 additions & 13 deletions .ci/docker/ubuntu-xenial

This file was deleted.

10 changes: 5 additions & 5 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

set -ex

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [ "${OS_NAME}" = "macos-latest" ]; then
. "${GITHUB_WORKSPACE}/.ci/install_macos.sh"
else
if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/install_linux_catkin.sh"
. "${GITHUB_WORKSPACE}/.ci/install_linux_catkin.sh"
else
. "${TRAVIS_BUILD_DIR}/.ci/install_linux_cmake.sh"
. "${GITHUB_WORKSPACE}/.ci/install_linux_cmake.sh"
fi
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/install_macos.sh"
fi
2 changes: 1 addition & 1 deletion .ci/install_linux_catkin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

cd "${HOME}/workspace"
cp -r "${TRAVIS_BUILD_DIR}" src
cp -r "${GITHUB_WORKSPACE}" src
./scripts/internal-distro.py --workspace=src distribution.yml --repository "${REPOSITORY}" ${REQUIRED_ONLY}

if [ $BUILD_NAME = TRUSTY_FULL_DEBUG ]; then
Expand Down
4 changes: 2 additions & 2 deletions .ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/script_catkin.sh"
. "${GITHUB_WORKSPACE}/.ci/script_catkin.sh"
else
. "${TRAVIS_BUILD_DIR}/.ci/script_cmake.sh"
. "${GITHUB_WORKSPACE}/.ci/script_cmake.sh"
fi
2 changes: 1 addition & 1 deletion .ci/script_catkin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export PACKAGE_NAMES="$(./scripts/internal-get-packages.py distribution.yml ${RE
./scripts/internal-build.sh ${PACKAGE_NAMES}

if [ $BUILD_NAME = DOCS ]; then
. "${TRAVIS_BUILD_DIR}/.ci/build_docs.sh"
. "${GITHUB_WORKSPACE}/.ci/build_docs.sh"
exit 0
fi

Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: build-test

on:
# Pushes / merges to master
push:
branches:
- master
# On creation and updating of PR
pull_request:
types: [opened, reopened, synchronize]
# Only those targeting master branch
branches:
- master
# Every two days
schedule:
- cron: '0 23 */2 * *'

defaults:
run:
shell: bash

jobs:
build:
continue-on-error: true
strategy:
matrix:
include:
# OSX Build
- os: macos-11.0
catkin: OFF
aikidopy: OFF
build: XCODE11_CMAKE_RELEASE
config: ""
# Bionic CMake
- os: ubuntu-18.04
catkin: OFF
aikidopy: OFF
build: BIONIC_CMAKE_RELEASE
config: ""
# Focal CMake
- os: ubuntu-20.04
catkin: OFF
aikidopy: OFF
build: FOCAL_CMAKE_RELEASE
config: ""
# Focal CMake Aikidopy
- os: ubuntu-20.04
catkin: OFF
aikidopy: ON
build: FOCAL_CMAKE_RELEASE_AIKIDOPY
config: ""
# Focal Catkin
- os: ubuntu-20.04
catkin: ON
aikidopy: OFF
build: FOCAL_CATKIN_FULL_RELEASE
config: "-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
# Focal Catkin Aikidopy
- os: ubuntu-20.04
catkin: ON
aikidopy: ON
build: FOCAL_CATKIN_FULL_RELEASE_AIKIDOPY
config: "-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON -DBUILD_AIKIDOPY=ON"
runs-on: ${{ matrix.os }}
name: ${{ matrix.build }}
env:
USE_CATKIN: ${{ matrix.catkin }}
BUILD_NAME: ${{ matrix.build }}
CATKIN_CONFIG_OPTIONS: ${{ matrix.config }}
BUILD_AIKIDOPY: ${{ matrix.aikidopy }}
BUILD_TYPE: Release
OS_NAME: ${{ matrix.os }}
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
REPOSITORY: aikido
SUDO: sudo
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Before install
run: .ci/before_install.sh
- name: Install
run: .ci/install.sh
- name: Script
run: .ci/script.sh
# Report on failed tests
- name: After failure
if: ${{ failure() }}
run: .ci/after_failure.sh
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: docs

on:
# Pushes / merges to master
push:
branches:
- master
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build:
strategy:
matrix:
include:
# Docs
- os: ubuntu-18.04
catkin: ON
aikidopy: OFF
build: DOCS
config: ""
runs-on: ${{ matrix.os }}
name: ${{ matrix.build }}
env:
USE_CATKIN: ${{ matrix.catkin }}
BUILD_NAME: ${{ matrix.build }}
CATKIN_CONFIG_OPTIONS: ${{ matrix.config }}
BUILD_AIKIDOPY: ${{ matrix.aikidopy }}
BUILD_TYPE: Release
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
REPOSITORY: aikido
SUDO: sudo
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Before install
run: .ci/before_install.sh
- name: Install
run: .ci/install.sh
- name: Script
run: .ci/script.sh
- name: After script
run: .ci/after_script.sh
- name: After failure
if: ${{ failure() }}
run: .ci/after_failure.sh
Loading