-
Notifications
You must be signed in to change notification settings - Fork 40
29 lines (29 loc) · 1.04 KB
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: GitHub Actions CI
run-name: ${{ github.actor }} is run GitHub Actions 🚀
on: [push]
defaults:
run:
shell: bash
jobs:
build-job:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GIT_TOKEN }}
- name: Install dependence
run: |
sudo apt install -y qemu-user-static binfmt-support
- name: Download code
uses: actions/checkout@v3
- name: Build and code test
run: |
docker pull ghcr.io/miroboticslab/cyberdog:v1
docker run -i -v $GITHUB_WORKSPACE:/home/ros2/src ghcr.io/miroboticslab/cyberdog:v1 bash -c \
"cd /home/ros2 && source /opt/ros2/galactic/setup.bash \
&& colcon build --packages-up-to cyberdog_bringup \
&& colcon test --event-handlers console_cohesion+ --return-code-on-test-failure --packages-select cyberdog_bringup"
# colcon build test