Skip to content
Open
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
37 changes: 29 additions & 8 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,39 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with: # added this, might fix a bug that's taken over 3 hours to find
with:
submodules: recursive
- name: build
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker-container
install: true

- name: Build multi-arch image
run: |
docker compose build --no-cache
- name: start and exec into container
run: | # ensure a clean build tree inside container, then build
docker compose run --rm -T rover bash -lc 'rm -rf build install log && colcon build --symlink-install --packages-up-to arm_control'
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag roverflake2:dev \
--file Dockerfile \
--push \
--load .
- name: Start and exec into container
run: |
docker compose run --rm -T rover bash -lc \
'rm -rf build install log && colcon build --symlink-install --packages-up-to arm_control'
- name: Cleanup
if: always()
run: |
docker compose down --remove-orphans || true
run: docker compose down --remove-orphans || true
- name: Notify Discord (success)
if: ${{ success() }}
uses: appleboy/[email protected]
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
# if you have anymore questions ask Aaron

# official base image in docs
FROM osrf/ros:humble-desktop
FROM --platform=$TARGETPLATFORM osrf/ros:humble-desktop

ARG TARGETPLATFORM
ARG BUILDPLATFORM

# Debugging info (optional)
RUN echo "Building for $TARGETPLATFORM on $BUILDPLATFORM"

# consistency with setup files
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ services:
build:
context: .
dockerfile: Dockerfile
#platforms:
#- linux/amd64
#- linux/arm64
image: roverflake2:dev
container_name: rover_dev
working_dir: /RoverFlake2
Expand Down
Loading