Skip to content
Snippets Groups Projects
Commit afb07d59 authored by Jorge Aparicio's avatar Jorge Aparicio
Browse files

enable cache and drop target files

parent 4cb26e63
Branches
Tags
No related merge requests found
cache: cargo
dist: trusty dist: trusty
language: rust language: rust
rust: nightly rust: nightly
...@@ -5,20 +6,18 @@ services: docker ...@@ -5,20 +6,18 @@ services: docker
sudo: required sudo: required
matrix: matrix:
exclude:
# first, clear the matrix
- rust: nightly
# then add the targets one by one
include: include:
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=thumbv6m-none-eabi - env: TARGET=thumbv6m-none-eabi
- env: TARGET=thumbv7m-none-eabi - env: TARGET=thumbv7m-none-eabi
- env: TARGET=thumbv7em-none-eabi - env: TARGET=thumbv7em-none-eabi
- env: TARGET=thumbv7em-none-eabihf - env: TARGET=thumbv7em-none-eabihf
env: TARGET=x86_64-unknown-linux-gnu
script: script:
- cargo generate-lockfile - cargo generate-lockfile
- sh ci/run-docker.sh $TARGET - sh ci/run-docker.sh $TARGET
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo
branches: branches:
only: only:
......
[package] [package]
authors = ["Jorge Aparicio <japaricious@gmail.com>"] authors = ["Jorge Aparicio <japaricious@gmail.com>"]
documentation = "https://docs.rs/volatile-register"
description = "Volatile access to memory mapped hardware registers" description = "Volatile access to memory mapped hardware registers"
license = "MIT OR Apache-2.0" documentation = "https://docs.rs/volatile-register"
keywords = ["volatile", "register"] keywords = ["volatile", "register"]
license = "MIT OR Apache-2.0"
name = "volatile-register" name = "volatile-register"
repository = "https://github.com/japaric/volatile-register" repository = "https://github.com/japaric/volatile-register"
version = "0.1.1" version = "0.1.1"
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1 ca-certificates \
ENV PATH=$PATH:/rust/bin curl \
libcurl4-openssl-dev \
libssh2-1
RUN curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
bash -s -- --at /usr/bin --from japaric/xargo --for x86_64-unknown-linux-gnu --tag v0.1.13
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1 ca-certificates \
ENV PATH=$PATH:/rust/bin curl \
libcurl4-openssl-dev \
libssh2-1
RUN curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
bash -s -- --at /usr/bin --from japaric/xargo --for x86_64-unknown-linux-gnu --tag v0.1.13
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1 ca-certificates \
ENV PATH=$PATH:/rust/bin curl \
libcurl4-openssl-dev \
libssh2-1
RUN curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
bash -s -- --at /usr/bin --from japaric/xargo --for x86_64-unknown-linux-gnu --tag v0.1.13
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1 ca-certificates \
ENV PATH=$PATH:/rust/bin curl \
libcurl4-openssl-dev \
libssh2-1
RUN curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
bash -s -- --at /usr/bin --from japaric/xargo --for x86_64-unknown-linux-gnu --tag v0.1.13
set -ex set -ex
run() { run() {
echo $1 local target=$1
docker build -t rust ci/docker/$1 echo $target
# This directory needs to exist before calling docker, otherwise docker will create it but it
# will be owned by root
mkdir -p target
docker build -t $target ci/docker/$target
docker run \ docker run \
-v `rustc --print sysroot`:/rust:ro \ --rm \
--user $(id -u):$(id -g) \
-e CARGO_HOME=/cargo \
-e CARGO_TARGET_DIR=/target \
-e HOME=/tmp \
-v $HOME/.cargo:/cargo \
-v `pwd`/target:/target \
-v `pwd`:/checkout:ro \ -v `pwd`:/checkout:ro \
-e CARGO_TARGET_DIR=/tmp/target \ -v `rustc --print sysroot`:/rust:ro \
-w /checkout \ -w /checkout \
-it rust \ -it $target \
ci/run.sh $1 sh -c "PATH=\$PATH:/rust/bin ci/run.sh $target"
} }
if [ -z "$1" ]; then if [ -z "$1" ]; then
for d in `ls ci/docker/`; do for d in `ls ci/docker/`; do
run $d run $d
......
...@@ -4,8 +4,6 @@ set -ex ...@@ -4,8 +4,6 @@ set -ex
case $1 in case $1 in
thumbv*) thumbv*)
curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | \
bash -s -- --at /usr/bin --from japaric/xargo --tag v0.1.9
xargo build --target $1 xargo build --target $1
;; ;;
*) *)
......
{
"arch": "arm",
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"features": "+strict-align",
"llvm-target": "thumbv6m-none-eabi",
"os": "none",
"target-endian": "little",
"target-pointer-width": "32"
}
{
"arch": "arm",
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"llvm-target": "thumbv7em-none-eabi",
"os": "none",
"target-endian": "little",
"target-pointer-width": "32"
}
{
"arch": "arm",
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"features": "+vfp4",
"llvm-target": "thumbv7em-none-eabihf",
"os": "none",
"target-endian": "little",
"target-pointer-width": "32"
}
{
"arch": "arm",
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"llvm-target": "thumbv7m-none-eabi",
"os": "none",
"target-endian": "little",
"target-pointer-width": "32"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment