Skip to content

Commit c9b9b17

Browse files
committed
Add a Dockerfile that validates that the crate can be compiled with nightly Rust
1 parent 762f784 commit c9b9b17

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target/
2+
Dockerfile

Dockerfile.ci

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:18.04
2+
3+
RUN useradd -m avr-rust
4+
5+
# Install dependencies
6+
RUN apt-get update -y && apt-get install -y wget gcc binutils gcc-avr avr-libc
7+
8+
RUN mkdir -p /code && chown avr-rust:avr-rust /code
9+
10+
USER avr-rust
11+
12+
# Install Rustup along with nightly
13+
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly -c rust-src --quiet
14+
ENV PATH=/home/avr-rust/.cargo/bin:$PATH
15+
16+
COPY --chown=avr-rust:avr-rust . /code/blink
17+
18+
WORKDIR /code/blink
19+
20+
CMD ["cargo", "build", "-Z", "build-std=core", "--target", "avr-atmega328p.json", "--release"]

0 commit comments

Comments
 (0)