diesel/.travis.yml

63 lines
2.6 KiB
YAML
Raw Normal View History

2015-11-26 22:11:57 +03:00
language: rust
sudo: required
dist: trusty
2015-11-26 22:11:57 +03:00
rust:
- stable
- beta
- nightly-2016-04-25
- nightly
2015-11-26 22:11:57 +03:00
addons:
postgresql: '9.4'
2015-11-26 22:11:57 +03:00
before_script:
- pip install 'travis-cargo<0.2' --user
- export PATH=$HOME/.local/bin:$PATH
- psql -c 'create database diesel_schema;' -U postgres
2015-11-26 22:11:57 +03:00
script:
- |
(cd diesel && travis-cargo doc -- --features "postgres sqlite chrono" && echo "docs.diesel.rs" > target/doc/CNAME) &&
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd diesel && travis-cargo test -- --no-default-features --features "unstable chrono $BACKEND")
else
(cd diesel && travis-cargo test -- --no-default-features --features "chrono $BACKEND")
fi &&
(cd diesel_cli && travis-cargo test -- --no-default-features --features "$BACKEND") &&
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd diesel_codegen && travis-cargo test -- --no-default-features --features "nightly $BACKEND")
else
(cd diesel_codegen && travis-cargo test -- --no-default-features --features "with-syntex $BACKEND")
fi &&
2015-12-06 16:55:41 +03:00
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
Initial SQLite support This commit adds all of the guts for SQLite3 support to Diesel. There are several outstanding issues which will need to be resolved before this is ready to be merged into master. This commit will not be merged into master until these issues have been resolved. Ultimately the most difficult remaining problem which we need to address is the lack of a `DEFAULT` keyword. I will detail why this is a problem and what I think we can do to solve it in a separate issue. SQLite has a fundamentally different mechanism for handling bind parameters than pretty much every other backend out there, where the function you call differs based on the type, rather than sending an array of bytes and telling the backend how to interpret it. `FromSql` had to be updated to address this (see https://github.com/sgrif/diesel/commit/8a330299443354575e48fcbe8f386024e239fe51 for details on that). I have not applied the same change to `ToSql`, as it was possible to shoehorn SQLite into our existing structure. While this may end up changing in the future, I do not believe it is necessary for 0.5. I'm not super happy about the structure of `StatementIterator`, `SqliteRow`, and `SqliteValue`, as ultimately the `Row` is a giant lie and `Statement` is the the value that maintains all of the state. Ultimately this comes out of the weird interaction between the fact that `Row#take` returns a reference, but sqlite's C api doesn't actually return a single value that works in that sense (and really doesn't have the concept of a row at all). As with much of our code overall, this can probably be cleaned up in the future by having the `Backend::RawValue` directly be a reference for `Pg`. I need to figure out a way to accomplish this without adding a lifetime to the `Pg` struct. I've broken our test suite into postgres specific and general where possible, but this is a *very* incomplete process. There are several modules which are entirely scoped to PG that do not need to be, which can be addressed independently in later PRs. Additionally, the entire `expression` module needs to be for expressions which are specific to PG. I do not believe that SQLite has anything specific to it which is not also supported by PG. Fixes #39 (mostly. Enough to close the issue at least)
2016-01-23 22:34:21 +03:00
(cd diesel_tests && travis-cargo test -- --no-default-features --features "unstable $BACKEND")
else
(cd diesel_tests && travis-cargo test -- --no-default-features --features "with-syntex $BACKEND")
fi &&
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd diesel_compile_tests && travis-cargo test)
fi
env:
Initial SQLite support This commit adds all of the guts for SQLite3 support to Diesel. There are several outstanding issues which will need to be resolved before this is ready to be merged into master. This commit will not be merged into master until these issues have been resolved. Ultimately the most difficult remaining problem which we need to address is the lack of a `DEFAULT` keyword. I will detail why this is a problem and what I think we can do to solve it in a separate issue. SQLite has a fundamentally different mechanism for handling bind parameters than pretty much every other backend out there, where the function you call differs based on the type, rather than sending an array of bytes and telling the backend how to interpret it. `FromSql` had to be updated to address this (see https://github.com/sgrif/diesel/commit/8a330299443354575e48fcbe8f386024e239fe51 for details on that). I have not applied the same change to `ToSql`, as it was possible to shoehorn SQLite into our existing structure. While this may end up changing in the future, I do not believe it is necessary for 0.5. I'm not super happy about the structure of `StatementIterator`, `SqliteRow`, and `SqliteValue`, as ultimately the `Row` is a giant lie and `Statement` is the the value that maintains all of the state. Ultimately this comes out of the weird interaction between the fact that `Row#take` returns a reference, but sqlite's C api doesn't actually return a single value that works in that sense (and really doesn't have the concept of a row at all). As with much of our code overall, this can probably be cleaned up in the future by having the `Backend::RawValue` directly be a reference for `Pg`. I need to figure out a way to accomplish this without adding a lifetime to the `Pg` struct. I've broken our test suite into postgres specific and general where possible, but this is a *very* incomplete process. There are several modules which are entirely scoped to PG that do not need to be, which can be addressed independently in later PRs. Additionally, the entire `expression` module needs to be for expressions which are specific to PG. I do not believe that SQLite has anything specific to it which is not also supported by PG. Fixes #39 (mostly. Enough to close the issue at least)
2016-01-23 22:34:21 +03:00
matrix:
- BACKEND=sqlite
DATABASE_URL=/tmp/test.db
Initial SQLite support This commit adds all of the guts for SQLite3 support to Diesel. There are several outstanding issues which will need to be resolved before this is ready to be merged into master. This commit will not be merged into master until these issues have been resolved. Ultimately the most difficult remaining problem which we need to address is the lack of a `DEFAULT` keyword. I will detail why this is a problem and what I think we can do to solve it in a separate issue. SQLite has a fundamentally different mechanism for handling bind parameters than pretty much every other backend out there, where the function you call differs based on the type, rather than sending an array of bytes and telling the backend how to interpret it. `FromSql` had to be updated to address this (see https://github.com/sgrif/diesel/commit/8a330299443354575e48fcbe8f386024e239fe51 for details on that). I have not applied the same change to `ToSql`, as it was possible to shoehorn SQLite into our existing structure. While this may end up changing in the future, I do not believe it is necessary for 0.5. I'm not super happy about the structure of `StatementIterator`, `SqliteRow`, and `SqliteValue`, as ultimately the `Row` is a giant lie and `Statement` is the the value that maintains all of the state. Ultimately this comes out of the weird interaction between the fact that `Row#take` returns a reference, but sqlite's C api doesn't actually return a single value that works in that sense (and really doesn't have the concept of a row at all). As with much of our code overall, this can probably be cleaned up in the future by having the `Backend::RawValue` directly be a reference for `Pg`. I need to figure out a way to accomplish this without adding a lifetime to the `Pg` struct. I've broken our test suite into postgres specific and general where possible, but this is a *very* incomplete process. There are several modules which are entirely scoped to PG that do not need to be, which can be addressed independently in later PRs. Additionally, the entire `expression` module needs to be for expressions which are specific to PG. I do not believe that SQLite has anything specific to it which is not also supported by PG. Fixes #39 (mostly. Enough to close the issue at least)
2016-01-23 22:34:21 +03:00
- BACKEND=postgres
DATABASE_URL=postgres://postgres@localhost/
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- secure: NmCM1VNEzid6bROA7tXV1R63n9S9KvY1etXsDzd1608cvjRnG3ZDAWXISbY1BxqrvleElreUJOvz/3TSQCHivpT2ezeyk2sntYtZpw0TWbz1SQMAPNWPTjP3bNQzpmNwfU4p6ui6qIOnQza4JxOu3SZSveNlehDBPkkS+52R7Zw/EPdwi9jTYJArV2+8pnEsQECAdRLttbtA2JBl3hZ4VHfGpHRZyeULn63UzyVbQVzQ3NVhqyQUKTPdpUciQTI3fZEkfaWuLV8QPPa5026/yJEEi2Fsl3r7fyY8ia67k4Zo9THlPVD0YOUlkWuZWwvkxNA8RQSVPv4FidEpwbxG8y6nAra4CjwiEChcpFhZJtrH7ZrXO/tJk7vtc5CFVWUsQtNX92QY1QFdPxwYNBSICLyUN+A+BQURwvQgxdcJsJyQmh5Ed7yuavcAinVq7fPeOyBWcPL5mt17no16aG1rzvXSUnD0aH7F3S3DHkoM9P9iHgJMLk+2YNmJtFescBxCeG8bA7t5bw0kQNH5KUWAD1uYpC9ikB3NVdlc+q17dKTAe4rcYA+sIO+UGudvpmLWT0lXtEMqDfxfCmyICDESs9bNfueCGJEAnfTBNunsJqR7rMUvjNndS2/Ssok6c/0Yfb9X8cM9nI4QLAj/+hClqdYphmpCjuC34bWxFSt/KJI=
2015-12-06 02:40:00 +03:00
matrix:
allow_failures:
- rust: nightly
2015-11-28 22:32:35 +03:00
after_success:
- "(cd diesel && travis-cargo --only stable doc-upload)"
branches:
only:
- master
- ಠ_ಠ
- diesel-sqlite-support
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/1d32e0ad32841bd56b02
on_success: change
on_failure: always
on_start: never