mozilla / mentat

UNMAINTAINED A persistent, relational store inspired by Datomic and DataScript.
https://mozilla.github.io/mentat/
Apache License 2.0
1.65k stars 115 forks source link

Run SQLCipher tests in Travis #738

Closed thomcc closed 6 years ago

thomcc commented 6 years ago

This is a follow up to https://github.com/mozilla/mentat/pull/737, but it ended up being a bit too furry of a yak for me to shave right now, and probably shouldn't block that code landing.

I do think it's worth doing, to avoid a case where nobody has tested support for SQLCipher a while. This is especially because of cargo test --all not working with it (specifying individual features to use for sub-crates doesn't work the way we would need – it only applies the feature to the root crate – and will be completely disallowed soon because of this).

This is the .travis.yml I had before deciding it's not worth figuring this out fully before moving on: https://gist.github.com/thomcc/b48c38560d950a253b86ed45fa31a3c9.

This builds, but fails when run due to failing to find the unicode61 tokenizer we request here: https://github.com/mozilla/mentat/blob/3d5ae797b2f79b27c9d6afce77160ede5b9cdff7/db/src/db.rs#L160. AFAICT travis uses Ubuntu 14.04, which uses the following version of https://packages.ubuntu.com/trusty/libsqlcipher-dev... which is from 2013. And so it corresponds to a Sqlite version that's too old for the features we need.

I guess the recommended way to use a newer Ubuntu on Travis is to use Docker, which... Sounds like a huge pain. Maybe we could just point apt at a newer package repository instead?

It's also possible we could use os: osx, and then install sqlcipher somehow (brew install sqlcipher --with-fts works great for me, but I don't know if you can easily use Homebrew in travis on osx). I've heard a lot of people complaining about Travis's osx support being spotty though, so this seems less ideal.