]> git.lizzy.rs Git - rust.git/commitdiff
Rename dist-fuchsia builder to cross2
authorbgermann <bgermann@users.noreply.github.com>
Wed, 4 Oct 2017 22:40:36 +0000 (00:40 +0200)
committerbgermann <bgermann@users.noreply.github.com>
Wed, 4 Oct 2017 22:40:36 +0000 (00:40 +0200)
src/ci/docker/cross2/Dockerfile [new file with mode: 0644]
src/ci/docker/cross2/build-fuchsia-toolchain.sh [new file with mode: 0755]
src/ci/docker/cross2/shared.sh [new file with mode: 0644]
src/ci/docker/dist-fuchsia/Dockerfile [deleted file]
src/ci/docker/dist-fuchsia/build-toolchain.sh [deleted file]
src/ci/docker/dist-fuchsia/shared.sh [deleted file]

diff --git a/src/ci/docker/cross2/Dockerfile b/src/ci/docker/cross2/Dockerfile
new file mode 100644 (file)
index 0000000..bcd9592
--- /dev/null
@@ -0,0 +1,41 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y \
+  build-essential \
+  bzip2 \
+  ca-certificates \
+  cmake \
+  curl \
+  file \
+  g++ \
+  gdb \
+  git \
+  libedit-dev \
+  make \
+  ninja-build \
+  nodejs \
+  python2.7-dev \
+  sudo \
+  xz-utils \
+  unzip
+
+WORKDIR /tmp
+COPY dist-fuchsia/shared.sh dist-fuchsia/build-toolchain.sh /tmp/
+RUN /tmp/build-toolchain.sh
+
+COPY scripts/sccache.sh /scripts/
+RUN sh /scripts/sccache.sh
+
+ENV \
+    AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \
+    CC_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang \
+    CXX_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang++ \
+    AR_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-ar \
+    CC_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang \
+    CXX_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang++
+
+ENV TARGETS=x86_64-unknown-fuchsia
+ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
+
+ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
+ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
\ No newline at end of file
diff --git a/src/ci/docker/cross2/build-fuchsia-toolchain.sh b/src/ci/docker/cross2/build-fuchsia-toolchain.sh
new file mode 100755 (executable)
index 0000000..756013a
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/bash
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+# ignore-tidy-linelength
+
+set -ex
+source shared.sh
+
+ZIRCON=e9a26dbc70d631029f8ee9763103910b7e3a2fe1
+
+mkdir -p zircon
+pushd zircon > /dev/null
+
+# Download sources
+git init
+git remote add origin https://fuchsia.googlesource.com/zircon
+git fetch --depth=1 origin $ZIRCON
+git reset --hard FETCH_HEAD
+
+# Download toolchain
+./scripts/download-toolchain
+chmod -R a+rx prebuilt/downloads/clang+llvm-x86_64-linux
+cp -a prebuilt/downloads/clang+llvm-x86_64-linux/. /usr/local
+
+build() {
+  local arch="$1"
+
+  case "${arch}" in
+    x86_64) tgt="zircon-pc-x86-64" ;;
+    aarch64) tgt="zircon-qemu-arm64" ;;
+  esac
+
+  hide_output make -j$(getconf _NPROCESSORS_ONLN) $tgt
+  dst=/usr/local/${arch}-unknown-fuchsia
+  mkdir -p $dst
+  cp -a build-${tgt}/sysroot/include $dst/
+  cp -a build-${tgt}/sysroot/lib $dst/
+}
+
+# Build sysroot
+for arch in x86_64 aarch64; do
+  build ${arch}
+done
+
+popd > /dev/null
+rm -rf zircon
+
+for arch in x86_64 aarch64; do
+  for tool in clang clang++; do
+    cat >/usr/local/bin/${arch}-unknown-fuchsia-${tool} <<EOF
+#!/bin/sh
+${tool} --target=${arch}-unknown-fuchsia --sysroot=/usr/local/${arch}-unknown-fuchsia "\$@"
+EOF
+    chmod +x /usr/local/bin/${arch}-unknown-fuchsia-${tool}
+  done
+  ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-unknown-fuchsia-ar
+done
diff --git a/src/ci/docker/cross2/shared.sh b/src/ci/docker/cross2/shared.sh
new file mode 100644 (file)
index 0000000..e26c6eb
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+hide_output() {
+  set +x
+  on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+  trap "$on_err" ERR
+  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+  PING_LOOP_PID=$!
+  "$@" &> /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  set -x
+}
diff --git a/src/ci/docker/dist-fuchsia/Dockerfile b/src/ci/docker/dist-fuchsia/Dockerfile
deleted file mode 100644 (file)
index bcd9592..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-FROM ubuntu:16.04
-
-RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y \
-  build-essential \
-  bzip2 \
-  ca-certificates \
-  cmake \
-  curl \
-  file \
-  g++ \
-  gdb \
-  git \
-  libedit-dev \
-  make \
-  ninja-build \
-  nodejs \
-  python2.7-dev \
-  sudo \
-  xz-utils \
-  unzip
-
-WORKDIR /tmp
-COPY dist-fuchsia/shared.sh dist-fuchsia/build-toolchain.sh /tmp/
-RUN /tmp/build-toolchain.sh
-
-COPY scripts/sccache.sh /scripts/
-RUN sh /scripts/sccache.sh
-
-ENV \
-    AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \
-    CC_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang \
-    CXX_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang++ \
-    AR_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-ar \
-    CC_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang \
-    CXX_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang++
-
-ENV TARGETS=x86_64-unknown-fuchsia
-ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
-
-ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
-ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
\ No newline at end of file
diff --git a/src/ci/docker/dist-fuchsia/build-toolchain.sh b/src/ci/docker/dist-fuchsia/build-toolchain.sh
deleted file mode 100755 (executable)
index 756013a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-# ignore-tidy-linelength
-
-set -ex
-source shared.sh
-
-ZIRCON=e9a26dbc70d631029f8ee9763103910b7e3a2fe1
-
-mkdir -p zircon
-pushd zircon > /dev/null
-
-# Download sources
-git init
-git remote add origin https://fuchsia.googlesource.com/zircon
-git fetch --depth=1 origin $ZIRCON
-git reset --hard FETCH_HEAD
-
-# Download toolchain
-./scripts/download-toolchain
-chmod -R a+rx prebuilt/downloads/clang+llvm-x86_64-linux
-cp -a prebuilt/downloads/clang+llvm-x86_64-linux/. /usr/local
-
-build() {
-  local arch="$1"
-
-  case "${arch}" in
-    x86_64) tgt="zircon-pc-x86-64" ;;
-    aarch64) tgt="zircon-qemu-arm64" ;;
-  esac
-
-  hide_output make -j$(getconf _NPROCESSORS_ONLN) $tgt
-  dst=/usr/local/${arch}-unknown-fuchsia
-  mkdir -p $dst
-  cp -a build-${tgt}/sysroot/include $dst/
-  cp -a build-${tgt}/sysroot/lib $dst/
-}
-
-# Build sysroot
-for arch in x86_64 aarch64; do
-  build ${arch}
-done
-
-popd > /dev/null
-rm -rf zircon
-
-for arch in x86_64 aarch64; do
-  for tool in clang clang++; do
-    cat >/usr/local/bin/${arch}-unknown-fuchsia-${tool} <<EOF
-#!/bin/sh
-${tool} --target=${arch}-unknown-fuchsia --sysroot=/usr/local/${arch}-unknown-fuchsia "\$@"
-EOF
-    chmod +x /usr/local/bin/${arch}-unknown-fuchsia-${tool}
-  done
-  ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-unknown-fuchsia-ar
-done
diff --git a/src/ci/docker/dist-fuchsia/shared.sh b/src/ci/docker/dist-fuchsia/shared.sh
deleted file mode 100644 (file)
index e26c6eb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-hide_output() {
-  set +x
-  on_err="
-echo ERROR: An error was encountered with the build.
-cat /tmp/build.log
-exit 1
-"
-  trap "$on_err" ERR
-  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
-  PING_LOOP_PID=$!
-  "$@" &> /tmp/build.log
-  trap - ERR
-  kill $PING_LOOP_PID
-  set -x
-}