diesel/.travis.yml

80 lines
3.5 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
cache: cargo
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
2017-02-10 19:26:41 +03:00
- mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'travis'@'%';" -uroot
2015-11-26 22:11:57 +03:00
script:
- |
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 &&
if [[ "$BACKEND" == postgres ]]; then
(cd examples && ./test_all)
fi &&
(cd diesel_cli && travis-cargo test -- --no-default-features --features "$BACKEND") &&
(cd diesel_infer_schema && travis-cargo test -- --no-default-features --features "$BACKEND") &&
2017-02-02 23:22:22 +03:00
(cd diesel_codegen && travis-cargo test -- --no-default-features --features "dotenv $BACKEND") &&
2015-12-06 16:55:41 +03:00
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd diesel_tests && travis-cargo test -- --no-default-features --features "unstable $BACKEND")
else
(cd diesel_tests && travis-cargo test -- --no-default-features --features "$BACKEND")
fi &&
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd diesel_compile_tests && travis-cargo test)
fi
2017-02-10 13:50:36 +03:00
matrix:
allow_failures:
- rust: nightly
include:
- rust: nightly-2017-02-09
2017-02-10 13:50:36 +03:00
env: CLIPPY=YESPLEASE
script:
- (cd diesel && cargo rustc --no-default-features --features "lint unstable chrono serde_json uuid sqlite postgres mysql" -- -Zno-trans)
- (cd diesel_cli && cargo rustc --no-default-features --features "lint sqlite postgres mysql" -- -Zno-trans)
- (cd diesel_codegen && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans)
- (cd diesel_infer_schema && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans)
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/
2017-02-10 19:26:41 +03:00
- BACKEND=mysql
DATABASE_URL=mysql://travis@localhost/diesel_test
MYSQL_UNIT_TEST_DATABASE_URL=mysql://travis@localhost/diesel_unit_test
RUST_TEST_THREADS=1
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- secure: NmCM1VNEzid6bROA7tXV1R63n9S9KvY1etXsDzd1608cvjRnG3ZDAWXISbY1BxqrvleElreUJOvz/3TSQCHivpT2ezeyk2sntYtZpw0TWbz1SQMAPNWPTjP3bNQzpmNwfU4p6ui6qIOnQza4JxOu3SZSveNlehDBPkkS+52R7Zw/EPdwi9jTYJArV2+8pnEsQECAdRLttbtA2JBl3hZ4VHfGpHRZyeULn63UzyVbQVzQ3NVhqyQUKTPdpUciQTI3fZEkfaWuLV8QPPa5026/yJEEi2Fsl3r7fyY8ia67k4Zo9THlPVD0YOUlkWuZWwvkxNA8RQSVPv4FidEpwbxG8y6nAra4CjwiEChcpFhZJtrH7ZrXO/tJk7vtc5CFVWUsQtNX92QY1QFdPxwYNBSICLyUN+A+BQURwvQgxdcJsJyQmh5Ed7yuavcAinVq7fPeOyBWcPL5mt17no16aG1rzvXSUnD0aH7F3S3DHkoM9P9iHgJMLk+2YNmJtFescBxCeG8bA7t5bw0kQNH5KUWAD1uYpC9ikB3NVdlc+q17dKTAe4rcYA+sIO+UGudvpmLWT0lXtEMqDfxfCmyICDESs9bNfueCGJEAnfTBNunsJqR7rMUvjNndS2/Ssok6c/0Yfb9X8cM9nI4QLAj/+hClqdYphmpCjuC34bWxFSt/KJI=
2015-11-28 22:32:35 +03:00
after_success:
2016-08-19 13:39:12 +03:00
- |
Release v0.10.0 (The one where we work on stable) ![It's happening](http://i.imgur.com/7drHiqr.gif) v0.10.0 drops support for Rust 1.14 and earlier, and adds support for Rust 1.15 (ON STABLE). `diesel_codegen_syntex` has been removed, and is no longer supported. Additionally, this release adds initial support for the JSON data type in PostgreSQL. There is also a new `print-schema` subcommand in Diesel CLI which will show you the code generated by `infer_schema!()`. As always, you can find a full list of what has changed in [the changelog][changelog]. In addition to the Diesel core team, 7 contributors worked on this release. A huge thank you to - Adrian Perez de Castro - Eric Kidd - Georg Semmler - Jake Goulding - Sergio Benitez - Severen Redwood - Stu Black I'd also like to thank everybody who helped this release by opening issues, finding bugs, and asking/answering questions in our gitter room. There were several big features that I had hoped to get done in time for this release, but my daughter inherited my troll gene and decided to come early. If you were hoping for MySQL support, blame Ruby. In the mean time, here is a picture of Ruby. ![baby ruby](https://lh3.googleusercontent.com/7vUZONdvrati-NQXriSqzKQ0CHNz6KRulOSos9kJjzMNV-JI2UT6d4Kxex9fZGO-0GTlLrKHKRwiPaf2v6hCJlCU0IgK5kWd_JWz9nG61FrZfgVARZEqXOmjoXPb5CYrbTg7XlG2VEYlcm6_Lk9oviVPh7mx3gaXgVG6g-OJRHqY_gipU-Y2REPFDoJyPWZ9QoifZH1WDGSPdyYUQ1KWeTfFkxk1Z3VP1bKAyRhsDmnXvSLaWkBQ6r5CpRS2pfVMC0lPVAfPGmrjwmNw7JmFNfscQM5IY0FOqbbwJhPJvLtNb-jOgOQhz07S8HA9BBI_cWzzXXMxbGXzaPpKBYSrioMja3MkXcb1PGB8cG7ERtG_CWwpGriRlFbrj2B0OygkAu4Q6pRiQe6BojpHYp03uyRsmsVxTbQjlH3axed6tNV_IDYSd2vz15gB7yFKUF_Je3spUUdexLmybdPDR29DfD-hBBJfezy0gdzrf7dJMMXWgQ7CW6jH18uydl-iiK3_8Ha8FUuvrjcA-Dvv0nQEXqajcb_NFCpobr92fNQvDCg6UNj3o7E7bv55Oj6sOk7N7xARchy-MmAV8Tzzc1Sx-4GKHhikH5WGMb5AzYSnoNcvWr7mD4vqAF1Wn_60Huz1KCNC5m2aBbPz9G6hBcM3pMe8J5pIM4epvKFvKUKtK98=w792-h1056-no) [changelog]: https://github.com/diesel-rs/diesel/blob/v0.10.0/CHANGELOG.md
2017-02-02 21:17:47 +03:00
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
2016-08-19 13:39:12 +03:00
(cd diesel && travis-cargo doc -- --features "postgres sqlite chrono uuid")
mkdir diesel/target
mv target/doc diesel/target/doc
echo "docs.diesel.rs" > diesel/target/doc/CNAME
(cd diesel && travis-cargo doc-upload)
2016-08-19 13:39:12 +03:00
fi
branches:
only:
- master
- ಠ_ಠ
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/1d32e0ad32841bd56b02
on_success: change
on_failure: always
on_start: never