-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from ethz-asl/feature/ci
Set up github actions
- Loading branch information
Showing
7 changed files
with
140 additions
and
13 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,49 @@ | ||
name: moma CD | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-dockers: | ||
name: Build docker images | ||
strategy: | ||
matrix: | ||
dockerfile: [dev, robot, demo] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out moma repo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: moma_ws/src/moma | ||
submodules: recursive | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: type=raw,value=${{ matrix.dockerfile }} | ||
- name: Build and push docker | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./moma_ws/src/moma/docker/ | ||
file: ./moma_ws/src/moma/docker/${{ matrix.dockerfile }}.Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,79 @@ | ||
name: moma CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: ${{ github.repository }} | ||
CATKIN_WS_PATH: moma_ws | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
docker_image_name: ${{ steps.meta.outputs.tags }} | ||
steps: | ||
- name: Check out moma repo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: moma_ws/src/moma | ||
submodules: recursive | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push docker | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./moma_ws/src/moma/docker/ | ||
file: ./moma_ws/src/moma/docker/dev.Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
build-catkin: | ||
needs: build-docker | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ needs.build-docker.outputs.docker_image_name }} | ||
steps: | ||
- name: Git safe directory (only for running within containers) | ||
run: git config --system --add safe.directory '*' | ||
- name: Check out moma repo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: moma_ws/src/moma | ||
submodules: recursive | ||
- run: ls | ||
shell: bash | ||
- name: Set up Catkin workspace | ||
run: | | ||
cd ${{ env.CATKIN_WS_PATH }} | ||
source /root/.bashrc | ||
catkin init | ||
catkin config --extend /root/moma_dep_ws/devel | ||
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
shell: bash | ||
- name: Build the workspace | ||
run: | | ||
cd ${{ env.CATKIN_WS_PATH }} | ||
source /root/.bashrc | ||
catkin build --continue | ||
shell: bash |
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,7 +1,3 @@ | ||
[submodule "submodules/yumi"] | ||
path = submodules/yumi | ||
url = [email protected]:ethz-asl/yumi.git | ||
branch = asl-devel | ||
[submodule "submodules/roboticsgroup_gazebo_plugins"] | ||
path = submodules/roboticsgroup_gazebo_plugins | ||
url = [email protected]:roboticsgroup/roboticsgroup_gazebo_plugins.git | ||
|
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 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 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
Submodule yumi
deleted from
18a2b0