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
No related branches found
No related tags found
No related merge requests found
cache: cargo
dist: trusty
language: rust
rust: nightly
......@@ -5,20 +6,18 @@ services: docker
sudo: required
matrix:
exclude:
# first, clear the matrix
- rust: nightly
# then add the targets one by one
include:
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=thumbv6m-none-eabi
- env: TARGET=thumbv7m-none-eabi
- env: TARGET=thumbv7em-none-eabi
- env: TARGET=thumbv7em-none-eabihf
env: TARGET=x86_64-unknown-linux-gnu
script:
- cargo generate-lockfile
- sh ci/run-docker.sh $TARGET
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo
branches:
only:
......
[package]
authors = ["Jorge Aparicio <japaricious@gmail.com>"]
documentation = "https://docs.rs/volatile-register"
description = "Volatile access to memory mapped hardware registers"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/volatile-register"
keywords = ["volatile", "register"]
license = "MIT OR Apache-2.0"
name = "volatile-register"
repository = "https://github.com/japaric/volatile-register"
version = "0.1.1"
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1
ENV PATH=$PATH:/rust/bin
ca-certificates \
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
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1
ENV PATH=$PATH:/rust/bin
ca-certificates \
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
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1
ENV PATH=$PATH:/rust/bin
ca-certificates \
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
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
ca-certificates curl libcurl4-openssl-dev libssh2-1
ENV PATH=$PATH:/rust/bin
ca-certificates \
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
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 \
-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 \
-e CARGO_TARGET_DIR=/tmp/target \
-v `rustc --print sysroot`:/rust:ro \
-w /checkout \
-it rust \
ci/run.sh $1
-it $target \
sh -c "PATH=\$PATH:/rust/bin ci/run.sh $target"
}
if [ -z "$1" ]; then
for d in `ls ci/docker/`; do
run $d
......
......@@ -4,8 +4,6 @@ set -ex
case $1 in
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
;;
*)
......
{
"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