aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml31
-rw-r--r--ci/docker/thumbv6m-none-eabi/Dockerfile5
-rw-r--r--ci/docker/thumbv7em-none-eabi/Dockerfile5
-rw-r--r--ci/docker/thumbv7em-none-eabihf/Dockerfile5
-rw-r--r--ci/docker/thumbv7m-none-eabi/Dockerfile5
-rw-r--r--ci/docker/x86_64-unknown-linux-gnu/Dockerfile5
-rwxr-xr-xci/run-docker.sh22
-rwxr-xr-xci/run.sh14
-rw-r--r--thumbv6m-none-eabi.json9
-rw-r--r--thumbv7em-none-eabi.json8
-rw-r--r--thumbv7em-none-eabihf.json9
-rw-r--r--thumbv7m-none-eabi.json8
12 files changed, 126 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1e9ac4f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,31 @@
+dist: trusty
+language: rust
+rust: nightly
+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
+
+script:
+ - cargo generate-lockfile
+ - sh ci/run-docker.sh $TARGET
+
+branches:
+ only:
+ - auto
+ - try
+
+notifications:
+ email:
+ on_success: never
+ webhooks: https://homu.herokuapp.com/travis
diff --git a/ci/docker/thumbv6m-none-eabi/Dockerfile b/ci/docker/thumbv6m-none-eabi/Dockerfile
new file mode 100644
index 0000000..25bf548
--- /dev/null
+++ b/ci/docker/thumbv6m-none-eabi/Dockerfile
@@ -0,0 +1,5 @@
+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
diff --git a/ci/docker/thumbv7em-none-eabi/Dockerfile b/ci/docker/thumbv7em-none-eabi/Dockerfile
new file mode 100644
index 0000000..25bf548
--- /dev/null
+++ b/ci/docker/thumbv7em-none-eabi/Dockerfile
@@ -0,0 +1,5 @@
+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
diff --git a/ci/docker/thumbv7em-none-eabihf/Dockerfile b/ci/docker/thumbv7em-none-eabihf/Dockerfile
new file mode 100644
index 0000000..25bf548
--- /dev/null
+++ b/ci/docker/thumbv7em-none-eabihf/Dockerfile
@@ -0,0 +1,5 @@
+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
diff --git a/ci/docker/thumbv7m-none-eabi/Dockerfile b/ci/docker/thumbv7m-none-eabi/Dockerfile
new file mode 100644
index 0000000..25bf548
--- /dev/null
+++ b/ci/docker/thumbv7m-none-eabi/Dockerfile
@@ -0,0 +1,5 @@
+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
diff --git a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
new file mode 100644
index 0000000..dbbecfa
--- /dev/null
+++ b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,5 @@
+FROM ubuntu:16.04
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+ ca-certificates gcc libc6-dev
+ENV PATH=$PATH:/rust/bin
diff --git a/ci/run-docker.sh b/ci/run-docker.sh
new file mode 100755
index 0000000..85b2c28
--- /dev/null
+++ b/ci/run-docker.sh
@@ -0,0 +1,22 @@
+set -ex
+
+run() {
+ echo $1
+
+ docker build -t rust ci/docker/$1
+ docker run \
+ -v `rustc --print sysroot`:/rust:ro \
+ -v `pwd`:/checkout:ro \
+ -e CARGO_TARGET_DIR=/tmp/target \
+ -w /checkout \
+ -it rust \
+ ci/run.sh $1
+}
+
+if [ -z "$1" ]; then
+ for d in `ls ci/docker/`; do
+ run $d
+ done
+else
+ run $1
+fi
diff --git a/ci/run.sh b/ci/run.sh
new file mode 100755
index 0000000..c1f2a5a
--- /dev/null
+++ b/ci/run.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+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
+ ;;
+ *)
+ cargo test --target $1
+ ;;
+esac
diff --git a/thumbv6m-none-eabi.json b/thumbv6m-none-eabi.json
new file mode 100644
index 0000000..4a31e30
--- /dev/null
+++ b/thumbv6m-none-eabi.json
@@ -0,0 +1,9 @@
+{
+ "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"
+}
diff --git a/thumbv7em-none-eabi.json b/thumbv7em-none-eabi.json
new file mode 100644
index 0000000..ce49c83
--- /dev/null
+++ b/thumbv7em-none-eabi.json
@@ -0,0 +1,8 @@
+{
+ "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"
+}
diff --git a/thumbv7em-none-eabihf.json b/thumbv7em-none-eabihf.json
new file mode 100644
index 0000000..bb0b87e
--- /dev/null
+++ b/thumbv7em-none-eabihf.json
@@ -0,0 +1,9 @@
+{
+ "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"
+}
diff --git a/thumbv7m-none-eabi.json b/thumbv7m-none-eabi.json
new file mode 100644
index 0000000..313a5e6
--- /dev/null
+++ b/thumbv7m-none-eabi.json
@@ -0,0 +1,8 @@
+{
+ "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"
+}