Initial commit
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Anton Zadvorny 2020-01-03 03:40:10 +03:00
commit da70fd80d7
3 changed files with 69 additions and 0 deletions

17
.drone.yml Normal file
View File

@ -0,0 +1,17 @@
kind: pipeline
name: default
clone:
depth: 50
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
registry: r.pkg.cx
repo: r.pkg.cx/build/rust
auto_tag: true

51
Dockerfile Normal file
View File

@ -0,0 +1,51 @@
FROM debian:buster-slim
ENV TZ=Europe/Moscow
ENV TERM=xterm-color
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:$PATH
ENV RUST_ARCH=x86_64-unknown-linux-gnu
ENV RUST_VERSION=1.40.0
ENV RUSTUP_VERSION=1.21.1
ENV RUSTUP_SHA256=ad1f8b5199b3b9e231472ed7aa08d2e5d1d539198a15c5b1e53c746aad81d27b
ENV CARGO_CACHE_VERSION=0.3.3
ENV CARGO_OUTDATED_VERSION=v0.9.1
ENV CARGO_TREE_VERSION=v0.28.0
RUN \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates curl gcc git libc6-dev && \
rm -rf /var/lib/apt/lists/*
RUN \
cp /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo "${TZ}" > /etc/timezone && date
RUN \
# download rustup
curl --silent --show-error --location https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUST_ARCH}/rustup-init --output rustup-init && \
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c - && \
chmod +x rustup-init && \
# install rust
./rustup-init -y --no-modify-path --profile minimal --default-host ${RUST_ARCH} --default-toolchain ${RUST_VERSION} && \
rm rustup-init && \
chmod -R a+w ${RUSTUP_HOME} ${CARGO_HOME} && \
# add clippy component
rustup component add clippy && \
# add rustfmt component
rustup component add rustfmt && \
# install cargo-cache
cargo install cargo-cache --force --git https://github.com/matthiaskrgr/cargo-cache.git --tag ${CARGO_CACHE_VERSION} && \
# install cargo-outdated
cargo install cargo-outdated --force --git https://github.com/kbknapp/cargo-outdated.git --tag ${CARGO_OUTDATED_VERSION} && \
# install cargo-tree
cargo install cargo-tree --force --git https://github.com/sfackler/cargo-tree.git --tag ${CARGO_TREE_VERSION} && \
# cleanup
cargo cache -r all && \
# print versions
rustup --version && \
cargo --version && \
rustc --version

1
README.md Normal file
View File

@ -0,0 +1 @@
[![Build Status](https://ci.pkg.cx/api/badges/build/rust/status.svg)](https://ci.pkg.cx/build/rust)