forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
a51b762
commit 09933ff
Showing
3 changed files
with
69 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 @@ | ||
/build/ |
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,29 @@ | ||
image: docker:stable | ||
|
||
variables: | ||
# When using dind service we need to instruct docker, to talk with the | ||
# daemon started inside of the service. The daemon is available with | ||
# a network connection instead of the default /var/run/docker.sock socket. | ||
# | ||
# The 'docker' hostname is the alias of the service container as described at | ||
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services | ||
# | ||
# Note that if you're using Kubernetes executor, the variable should be set to | ||
# tcp://localhost:2375 because of how Kubernetes executor connects services | ||
# to the job container | ||
DOCKER_HOST: tcp://docker:2375/ | ||
# When using dind, it's wise to use the overlayfs driver for | ||
# improved performance. | ||
DOCKER_DRIVER: overlay2 | ||
|
||
services: | ||
- docker:dind | ||
|
||
before_script: | ||
- docker info | ||
|
||
build: | ||
stage: build | ||
script: | ||
- docker build -t avr-rust . | ||
- docker run avr-rust echo hello world |
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,39 @@ | ||
FROM ubuntu:18.04 | ||
|
||
USER root | ||
|
||
# Install dependencies. | ||
RUN apt-get update && apt-get install -y build-essential cmake curl git python | ||
|
||
# Create a regular user. | ||
RUN useradd -m rustacean | ||
|
||
# Copy the code over, create an empty directory for builds. | ||
ADD . /code | ||
# RUN cd /code | ||
RUN mkdir /build && cd /build | ||
|
||
# symlink Rust build directory to the /build volume | ||
# RUN mkdir /build && ln -sf /build /code/build | ||
|
||
# Compile rust. | ||
# RUN /code/x.py build | ||
|
||
# Generate Makefile using settings suitable for an experimental compiler | ||
RUN /code/configure \ | ||
--enable-debug \ | ||
--disable-docs \ | ||
--enable-llvm-assertions \ | ||
--enable-debug-assertions \ | ||
--enable-optimize \ | ||
--enable-llvm-release-debuginfo \ | ||
--experimental-targets=AVR | ||
|
||
RUN make | ||
RUN make install | ||
|
||
# Drop down to the regular user | ||
USER rustacean | ||
|
||
VOLUME /code | ||
VOLUME /build |