-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 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,35 @@ | ||
name: docker-build-base | ||
|
||
# Only build base when any of the files in the base directory are modified | ||
on: | ||
push: | ||
branches: [master, ci] | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: "{{defaultContext}}" | ||
push: false | ||
platforms: linux/amd64 | ||
build-args: git_hash=${{ github.sha }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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,26 @@ | ||
# Note: this Dockerfile is only used for the CI. Please refer to the | ||
# instructions in README.md to use this repo | ||
|
||
FROM kumarrobotics/jackal-master:latest | ||
|
||
# Requires a docker build argument `user_id` | ||
ARG user_id=1000 | ||
env USER dcist | ||
ARG git_hash | ||
|
||
# Create a base docker environment | ||
RUN . ~/jackal_ws/devel/setup.sh \ | ||
&& mkdir -p ~/user_ws/src && cd ~/user_ws \ | ||
&& catkin config --extend ~/jackal_ws/devel \ | ||
&& catkin build --no-status -DCMAKE_BUILD_TYPE=Release | ||
|
||
# Clone the git directory | ||
RUN cd ~/user_ws/src \ | ||
&& git clone --recursive -j4 https://github.com/KumarRobotics/spomp-system.git \ | ||
&& cd spomp-system \ | ||
&& git checkout ${git_hash} | ||
|
||
# Build the workspace | ||
RUN cd ~/user_ws \ | ||
&& catkin build --no-status -DCMAKE_BUILD_TYPE=Release \ | ||
&& catkin build |