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

Build extra riotdocker variant that includes nightly Rust #222

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,31 @@ jobs:
build-args: |
DOCKER_REGISTRY=${{ env.DOCKER_REGISTRY }}

- name: Build riotbuild-rustnightly
uses: docker/build-push-action@v2
with:
context: ./riotbuild-rustnightly
tags: |
${{ env.DOCKER_REGISTRY }}/riotbuild-rustnightly:latest
${{ env.DOCKER_REGISTRY }}/riotbuild-rustnightly:${{ env.VERSION_TAG }}
build-args: |
DOCKER_REGISTRY=${{ env.DOCKER_REGISTRY }}

- name: Rust build test on Rust nightly
run: |
# Some of the above are executed by root, creating ~/.cargo/git as
# that user, blocking downloads of own libraries.
rm -rf ~/.cargo
make -CRIOT/examples/rust-hello-world BUILDTEST_MAKE_REDIRECT='' buildtest CARGO_CHANNEL=nightly
make -CRIOT/examples/rust-gcoap BUILDTEST_MAKE_REDIRECT='' buildtest CARGO_CHANNEL=nightly
env:
BUILD_IN_DOCKER: 1
DOCKER_IMAGE: ${{ env.DOCKER_REGISTRY }}/riotbuild-rustnightly:latest
# Not all of them are actually available; still using the "canonical"
# list of representative boards above to keep this stable whil Rust
# support expands
BOARDS: "arduino-uno esp32-wroom-32 hifive1b msb-430h native samr21-xpro"

- name: Login to DockerHub
if: "${{ github.ref == 'refs/heads/master' }}"
uses: docker/login-action@v1
Expand Down
20 changes: 20 additions & 0 deletions riotbuild-rustnightly/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Dockerfile for RIOT build environments with extra Rust nightly
#
# The resulting image will be based on riotdocker, but also install the current
# RIOT nightly versions to enable easy building of applications that need
# nightly.

ARG DOCKER_REGISTRY="docker.io/riot"
FROM ${DOCKER_REGISTRY}/riotbuild:latest

# For the value of CARGO_HOME, see the comments in riotbuild's Dockerfile.
RUN \
set -ex; \
export CARGO_HOME=/opt/rustup/.cargo; \
rustup toolchain add nightly; \
for target in $(rustup target list --installed); \
do \
rustup target add $target --toolchain nightly; \
done; \
rustup default nightly