Skip to content
Snippets Groups Projects
Commit 739edbc4 authored by Alex Crichton's avatar Alex Crichton
Browse files

Use workspaces in this repo

Also cache on appveyor to speed up builds.
parent 9497f192
No related merge requests found
...@@ -23,13 +23,14 @@ dependencies = [ ...@@ -23,13 +23,14 @@ dependencies = [
[[package]] [[package]]
name = "gcc" name = "gcc"
version = "0.3.35" version = "0.3.35"
source = "git+https://github.com/alexcrichton/gcc-rs#fbb4ef58f028ee5e61307b479b53c8d8070db52c" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "gcc" name = "generate-files"
version = "0.3.35" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [
replace = "gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)" "ctest 0.1.0 (git+https://github.com/alexcrichton/ctest)",
]
[[package]] [[package]]
name = "kernel32-sys" name = "kernel32-sys"
...@@ -99,7 +100,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" ...@@ -99,7 +100,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata] [metadata]
"checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" "checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c"
"checksum ctest 0.1.0 (git+https://github.com/alexcrichton/ctest)" = "<none>" "checksum ctest 0.1.0 (git+https://github.com/alexcrichton/ctest)" = "<none>"
"checksum gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)" = "<none>"
"checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312" "checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122" "checksum libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
......
...@@ -16,3 +16,6 @@ other common platform libraries. ...@@ -16,3 +16,6 @@ other common platform libraries.
[features] [features]
default = ["use_std"] default = ["use_std"]
use_std = [] use_std = []
[workspace]
members = ["libc-test", "libc-test/generate-files"]
...@@ -19,3 +19,7 @@ build: false ...@@ -19,3 +19,7 @@ build: false
test_script: test_script:
- cargo test - cargo test
- cargo run --manifest-path libc-test/Cargo.toml - cargo run --manifest-path libc-test/Cargo.toml
cache:
- target
- C:\Users\appveyor\.cargo\registry
...@@ -18,4 +18,5 @@ RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \ ...@@ -18,4 +18,5 @@ RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
make CROSS_COMPILE= install -j4 && \ make CROSS_COMPILE= install -j4 && \
cd .. && \ cd .. && \
rm -rf musl-1.1.15 rm -rf musl-1.1.15
ENV PATH=$PATH:/musl-i686/bin:/rust/bin ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
CC_i686_unknown_linux_musl=musl-gcc
...@@ -3,7 +3,7 @@ USER root ...@@ -3,7 +3,7 @@ USER root
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
qemu qemu-kvm kmod cpu-checker qemu genext2fs
ENTRYPOINT ["sh"] ENTRYPOINT ["sh"]
......
...@@ -2,6 +2,7 @@ FROM ubuntu:16.10 ...@@ -2,6 +2,7 @@ FROM ubuntu:16.10
RUN apt-get update RUN apt-get update
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
gcc libc6-dev qemu qemu-kvm curl ca-certificates kmod cpu-checker gcc libc6-dev qemu curl ca-certificates \
genext2fs
ENV PATH=$PATH:/rust/bin \ ENV PATH=$PATH:/rust/bin \
QEMU=2016-09-07/openbsd-6.0-without-pkgs.qcow2 QEMU=2016-09-07/openbsd-6.0-without-pkgs.qcow2
...@@ -7,6 +7,7 @@ run() { ...@@ -7,6 +7,7 @@ run() {
echo $1 echo $1
docker build -t libc ci/docker/$1 docker build -t libc ci/docker/$1
docker run \ docker run \
--rm \
-v `rustc --print sysroot`:/rust:ro \ -v `rustc --print sysroot`:/rust:ro \
-v `pwd`:/checkout:ro \ -v `pwd`:/checkout:ro \
-e CARGO_TARGET_DIR=/tmp/target \ -e CARGO_TARGET_DIR=/tmp/target \
......
...@@ -37,11 +37,7 @@ if [ "$QEMU" != "" ]; then ...@@ -37,11 +37,7 @@ if [ "$QEMU" != "" ]; then
# This will have a `run.sh` script will which use the artifacts inside to run # This will have a `run.sh` script will which use the artifacts inside to run
# on the host. # on the host.
rm -f $tmpdir/libc-test.img rm -f $tmpdir/libc-test.img
dd if=/dev/null of=$tmpdir/libc-test.img bs=1M seek=50
mkfs.ext2 -F $tmpdir/libc-test.img
rm -rf $tmpdir/mount
mkdir $tmpdir/mount mkdir $tmpdir/mount
mount -t ext2 -o loop $tmpdir/libc-test.img $tmpdir/mount
# If we have a cross compiler, then we just do the standard rigamarole of # If we have a cross compiler, then we just do the standard rigamarole of
# cross-compiling an executable and then the script to run just executes the # cross-compiling an executable and then the script to run just executes the
...@@ -74,22 +70,18 @@ if [ "$QEMU" != "" ]; then ...@@ -74,22 +70,18 @@ if [ "$QEMU" != "" ]; then
cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml
fi fi
umount $tmpdir/mount du -sh $tmpdir/mount
genext2fs \
# If we can use kvm, prefer that, otherwise just fall back to user-space --root $tmpdir/mount \
# emulation. --size-in-blocks 100000 \
if kvm-ok; then $tmpdir/libc-test.img
program=kvm
else
program=qemu-system-x86_64
fi
# Pass -snapshot to prevent tampering with the disk images, this helps when # Pass -snapshot to prevent tampering with the disk images, this helps when
# running this script in development. The two drives are then passed next, # running this script in development. The two drives are then passed next,
# first is the OS and second is the one we just made. Next the network is # first is the OS and second is the one we just made. Next the network is
# configured to work (I'm not entirely sure how), and then finally we turn off # configured to work (I'm not entirely sure how), and then finally we turn off
# graphics and redirect the serial console output to out.log. # graphics and redirect the serial console output to out.log.
$program \ qemu-system-x86_64 \
-m 1024 \ -m 1024 \
-snapshot \ -snapshot \
-drive if=virtio,file=$tmpdir/$qemufile \ -drive if=virtio,file=$tmpdir/$qemufile \
......
[root]
name = "generate-files"
version = "0.1.0"
dependencies = [
"ctest 0.1.0 (git+https://github.com/alexcrichton/ctest)",
]
[[package]]
name = "advapi32-sys"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bitflags"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "ctest"
version = "0.1.0"
source = "git+https://github.com/alexcrichton/ctest#a6becb6d7fd23d9863cba86eac31d1ffc4082734"
dependencies = [
"gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "kernel32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "log"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-serialize"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syntex_syntax"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-xid"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "307c92332867e586720c0222ee9d890bbe8431711efed8a1b06bc5b40fc66bd7"
"checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c"
"checksum ctest 0.1.0 (git+https://github.com/alexcrichton/ctest)" = "<none>"
"checksum gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)" = "ca10e3e1f1c8278047da19b94dc17c4397861150d5fbcea052eedb1d9847d356"
"checksum kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b5e7edf375e6d26243bde172f1d5ed1446f4a766fc9b7006e1fd27258243f1"
"checksum libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
"checksum libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b3222582df17067e4ffcc6dc12f7f65b5aef89586ef486af1cf97290f7f809fb"
"checksum log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "038b5d13189a14e5b6ac384fdb7c691a45ef0885f6d2dddbf422e6c3506b8234"
"checksum rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "1a48546a64cae47d06885e9bccadb99d0547d877a94c5167fa451ea33a484456"
"checksum syntex_syntax 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8739e1a8b53efe7349917259f8ced15f797c89bf788a86e44f61addc0d1ecf68"
"checksum term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f2077e54d38055cf1ca0fd7933a2e00cd3ec8f6fed352b2a377f06dcdaaf3281"
"checksum unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb"
"checksum winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4dfaaa8fbdaa618fa6914b59b2769d690dd7521920a18d84b42d254678dd5fd4"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment