Skip to content

Add github actions CI instead of Jenkins #1

Add github actions CI instead of Jenkins

Add github actions CI instead of Jenkins #1

Workflow file for this run

name: Build Test
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: [self-hosted, linux]
strategy:
fail-fast: false
matrix:
config:
- {rosdistro: 'noetic', container: 'ros:noetic-ros-base-focal'}
container: ${{ matrix.config.container }}
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install catkin-tools on Noetic
run: |
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
apt update && apt install -y python3-pip
pip3 install osrf-pycommon
apt update && apt install -y python3-wstool python3-catkin-tools
- name: Install Dependencies
run: |
$GITHUB_WORKSPACE/install/prepare-jenkins-slave.sh
shell: bash
- name: Build test
working-directory:
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y autoconf libtool git qt5-default
mkdir -p $HOME/catkin_ws/src;
cd $HOME/catkin_ws
catkin init
catkin config --extend "/opt/ros/${{matrix.config.rosdistro}}"
catkin config --merge-devel
cd $HOME/catkin_ws/src
ln -s $GITHUB_WORKSPACE
cd $HOME/catkin_ws
rosdep update
rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}}
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build -j$(nproc) -l$(nproc)
shell: bash