Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile for cross itself #667

Closed
wants to merge 7 commits into from
Closed
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ jobs:
- { target: thumbv7em-none-eabi, os: ubuntu-latest, std: 1 }
- { target: thumbv7em-none-eabihf, os: ubuntu-latest, std: 1 }
- { target: thumbv7m-none-eabi, os: ubuntu-latest, std: 1 }

- { target: cross os: ubuntu-latest }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work either sadly, it'll have to be it's own task/action for the image to be built and published


docker-image:
name: docker-image (${{ matrix.target }})
Expand Down
10 changes: 10 additions & 0 deletions docker/Dockerfile.cross-in-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM rust:latest

ENV CROSS_DOCKER_IN_DOCKER=true

ARG checksum="d9d9b964d428733e98c2579b91772af4 /usr/bin/docker"

RUN wget -O- https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz | tar -C /usr/bin/ --strip-components=1 -xzf - docker/docker
RUN echo $checksum | md5sum -c

RUN cargo install --git https://github.com/cross-rs/cross
Copy link
Member

@Emilgardis Emilgardis Jun 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still wrong, it should copy from the checked out code, if this is kept the CI will work, but it'll check the most recent main branch changes, not the proposed changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it should use the checkout for building, thanks @Emilgardis for raising this up.