summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-24 22:42:12 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-24 22:42:12 +0800
commit677cfbea5c6652e96fffd70a2bcd7078a42b4387 (patch)
treee870939307971e2e9d708f507afd808ca9d7adf6
parent3f55d3c5edfe467f498f1e4d296c1d2ccc8bf0eb (diff)
downloadmrust-677cfbea5c6652e96fffd70a2bcd7078a42b4387.tar.gz
Makefile - Support CI builds (draft)
-rw-r--r--.gitignore5
-rw-r--r--.travis.yml10
-rw-r--r--Makefile7
3 files changed, 21 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 4aad67b4..a1c0828d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,12 +2,17 @@
/bin
/mrustc.depend
/mrustc.layout
+/rustc-nightly-src.tar.gz
+/rustc-nightly
+
/.obj
*.gch
*.gch.dep
*.sw[po]
/output
+/gitstats
+
/bnf/*.o
/bnf/*.dep
/bnf/.gen/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..7649d8c9
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+language: cpp
+install: make
+
+before_script:
+ - make UPDATE
+
+script:
+ - make
+ - make test
+ - make rust_tests-run-pass
diff --git a/Makefile b/Makefile
index 7db3a5cb..eece6c25 100644
--- a/Makefile
+++ b/Makefile
@@ -63,11 +63,16 @@ output/%.ast: samples/%.rs $(BIN)
@mkdir -p output/
$(DBG) $(BIN) $< --emit ast -o $@ $(PIPECMD)
-RUSTCSRC := /home/tpg/Source/rust/rustc-nightly/
+RUSTCSRC := ./rustc-nightly/
output/core.ast: $(RUSTCSRC)src/libcore/lib.rs $(BIN)
@mkdir -p output/
$(DBG) $(BIN) $< --emit ast -o $@ $(PIPECMD)
+.PHONY: UPDATE
+UPDATE:
+ wget https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
+ tar -xf rustc-nightly-src.tar.gz
+
.PHONY: rust_tests
RUST_TESTS_DIR := $(RUSTCSRC)src/test/
rust_tests: rust_tests-run-pass rust_tests-run-fail rust_tests-compile-fail