Skip to content

Commit

Permalink
Update project structure and ensure examples, tests and docs are buil…
Browse files Browse the repository at this point in the history
…t on travis-ci
  • Loading branch information
brendanzab committed Aug 6, 2014
1 parent 4cf82d2 commit bc7af39
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_store
/target
/examples/*/target
Cargo.lock
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: rust

env:
global:
- secure: SH7xrrH8ONXcrpHzKVJsBuLX1AikKBTBBI0SsEfCWfDZsAur0rQW5ZlPPorhQ0iZUbvw5xwY26T+0EYdBAWOwp7AOBM2iwoGZ15ERTd8o2JX3ZlMQ9AvDHNaXAc6YToj69DaiaimX+oX9DtZeRfQ309Lkp4D1YMrf4X/jhNpQdI=
install:
# glfw
- sudo apt-get install libXxf86vm-dev
Expand All @@ -10,3 +13,12 @@ install:
- make
- sudo make install
- cd ..
script:
- cargo build
- cargo test
- make -C examples
# the doc directory needs to be in the root for rust-ci
- cargo doc
- ln -s target/doc doc
after_script:
- curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ authors = ["Brendan Zabarauskas <[email protected]>",
"Arseny Kapoulkine"
]

build = "git submodule update --init --recursive"
[[lib]]
name = "gl"
path = "src/gl/lib.rs"

[dependencies.gl_generator]

path = "src/gl_generator"
17 changes: 17 additions & 0 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
all: build

build:
(cd static_basic && cargo build)
(cd static_triangle && cargo build)
# error: couldn't open file (no such file or directory (No such file or directory); path=deps/khronos-api/gl.xml; mode=open; access=read)
# (cd struct_triangle && cargo build)

update:
(cd static_basic && cargo update)
(cd static_triangle && cargo update)
# (cd struct_triangle && cargo update)

clean:
(cd static_basic && cargo clean)
(cd static_triangle && cargo clean)
# (cd struct_triangle && cargo clean)
18 changes: 18 additions & 0 deletions examples/static_basic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]

name = "static-basic"
version = "0.1.0"
authors = [
]

build = "git submodule update --init --recursive"

[[bin]]
name = "static-basic"
path = "main.rs"

[dependencies.gl]
path = "../../"

[dependencies.glfw]
git = "https://github.com/bjz/glfw-rs.git"
File renamed without changes.
16 changes: 16 additions & 0 deletions examples/static_triangle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]

name = "static-triangle"
version = "0.1.0"
authors = [
]

[[bin]]
name = "static-triangle"
path = "main.rs"

[dependencies.gl]
path = "../../"

[dependencies.glfw]
git = "https://github.com/bjz/glfw-rs.git"
File renamed without changes.
16 changes: 16 additions & 0 deletions examples/struct_triangle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]

name = "struct-triangle"
version = "0.1.0"
authors = [
]

[[bin]]
name = "struct-triangle"
path = "main.rs"

[dependencies.gl_generator]
path = "../../"

[dependencies.glfw]
git = "https://github.com/bjz/glfw-rs.git"
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/gl_generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ authors = ["Brendan Zabarauskas <[email protected]>",
[[lib]]

name = "gl_generator"
path = "lib.rs"
plugin = true
path = "src/lib.rs"

[dependencies.rust-xml]
git = "https://github.com/netvl/rust-xml"

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bc7af39

Please sign in to comment.