Compare commits
28 commits
master
...
fluffyemil
Author | SHA1 | Date | |
---|---|---|---|
|
8287dd308c | ||
|
2ab340155a | ||
|
148fdd4aa4 | ||
|
468899d36e | ||
|
d724cc03fe | ||
|
2ddb5fd3f4 | ||
|
9d4892a1c1 | ||
|
2bf95b6d1b | ||
|
0ed6001857 | ||
|
9154303fa1 | ||
|
49c24af9cc | ||
|
5bcbfd41b2 | ||
|
cf79e98296 | ||
|
fda02a6364 | ||
|
3b90e376b9 | ||
|
5180a3f899 | ||
|
3f7e808f4b | ||
|
a5fd51f6be | ||
|
5e2e381125 | ||
|
21e9e9a229 | ||
|
120326ae75 | ||
|
a121f2a0eb | ||
|
76d1acdedf | ||
|
06ea759fca | ||
|
7900da614c | ||
|
b4a50767c6 | ||
|
92f7a527f0 | ||
|
70501eb720 |
4 changed files with 90 additions and 32 deletions
97
.travis.yml
97
.travis.yml
|
@ -1,35 +1,70 @@
|
||||||
language: rust
|
|
||||||
# We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
|
||||||
# (The version in Travis's default Ubuntu Trusty is much too old).
|
|
||||||
os: osx
|
|
||||||
before_install:
|
|
||||||
- brew install sqlcipher --with-fts
|
|
||||||
rust:
|
|
||||||
- 1.25.0 # Must align with `build/version.rs`.
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
matrix:
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
fast_finish: true
|
include:
|
||||||
|
# - language: rust
|
||||||
|
# # We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
||||||
|
# # (The version in Travis's default Ubuntu Trusty is much too old).
|
||||||
|
# os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew install sqlcipher --with-fts
|
||||||
|
# rust: 1.25.0 # Must align with `build/version.rs`.
|
||||||
|
# script:
|
||||||
|
# - ./scripts/cargo_test.sh
|
||||||
|
# after_success:
|
||||||
|
# - |
|
||||||
|
# if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
|
||||||
|
# cargo doc &&
|
||||||
|
# echo "<meta http-equiv=refresh content=0;url=mentat/index.html>" > target/doc/index.html &&
|
||||||
|
# git clone https://github.com/davisp/ghp-import.git &&
|
||||||
|
# ./ghp-import/ghp_import.py -n -p -f -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc
|
||||||
|
# fi
|
||||||
|
# cache: cargo
|
||||||
|
# - language: rust
|
||||||
|
# # We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
||||||
|
# # (The version in Travis's default Ubuntu Trusty is much too old).
|
||||||
|
# os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew install sqlcipher --with-fts
|
||||||
|
# rust: stable
|
||||||
|
# script:
|
||||||
|
# - ./scripts/cargo_test.sh
|
||||||
|
# cache: cargo
|
||||||
|
# - language: rust
|
||||||
|
# # We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
||||||
|
# # (The version in Travis's default Ubuntu Trusty is much too old).
|
||||||
|
# os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew install sqlcipher --with-fts
|
||||||
|
# rust: beta
|
||||||
|
# script:
|
||||||
|
# - ./scripts/cargo_test.sh
|
||||||
|
# cache: cargo
|
||||||
|
# - language: rust
|
||||||
|
# # We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
||||||
|
# # (The version in Travis's default Ubuntu Trusty is much too old).
|
||||||
|
# os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew install sqlcipher --with-fts
|
||||||
|
# rust: nightly
|
||||||
|
# script:
|
||||||
|
# - ./scripts/cargo_test.sh
|
||||||
|
# cache: cargo
|
||||||
|
- language: rust
|
||||||
|
dist: trusty
|
||||||
|
rust: stable
|
||||||
|
os: osx
|
||||||
|
install:
|
||||||
|
- rustup target add aarch64-apple-ios armv7-apple-ios armv7s-apple-ios x86_64-apple-ios i386-apple-ios
|
||||||
|
# Cargo-lipo needs to be Beta version available on master and not crates version to handle building in subdirectories
|
||||||
|
- cargo install --git https://github.com/TimNN/cargo-lipo
|
||||||
|
- instruments -s devices
|
||||||
script:
|
script:
|
||||||
- cargo test --verbose --all
|
- >
|
||||||
- cargo test --features edn/serde_support --verbose --all
|
cd ffi &&
|
||||||
# We can't pick individual features out with `cargo test --all` (At the time of this writing, this
|
cargo lipo --release &&
|
||||||
# works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing
|
cd ..
|
||||||
# this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To
|
- cd sdks/swift/Mentat
|
||||||
# work around this, we run individual tests for each subcrate individually.
|
- xcodebuild -configuration Debug -scheme "Mentat Debug" -sdk iphonesimulator test -destination 'platform=iOS Simulator,name=iPhone X,OS=11.4'
|
||||||
- |
|
- cd ../../..
|
||||||
for manifest in $(find . -type f -name Cargo.toml); do
|
|
||||||
cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher
|
|
||||||
done
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
|
|
||||||
cargo doc &&
|
|
||||||
echo "<meta http-equiv=refresh content=0;url=mentat/index.html>" > target/doc/index.html &&
|
|
||||||
git clone https://github.com/davisp/ghp-import.git &&
|
|
||||||
./ghp-import/ghp_import.py -n -p -f -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc
|
|
||||||
fi
|
|
||||||
cache: cargo
|
|
||||||
|
|
11
cargo-config.toml.template
Executable file
11
cargo-config.toml.template
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
[target.aarch64-linux-android]
|
||||||
|
ar = "$PWD/NDK/arm64/bin/aarch64-linux-android-ar"
|
||||||
|
linker = "$PWD/NDK/arm64/bin/aarch64-linux-android-clang"
|
||||||
|
|
||||||
|
[target.armv7-linux-androideabi]
|
||||||
|
ar = "$PWD/NDK/arm/bin/arm-linux-androideabi-ar"
|
||||||
|
linker = "$PWD/NDK/arm/bin/arm-linux-androideabi-clang"
|
||||||
|
|
||||||
|
[target.i686-linux-android]
|
||||||
|
ar = "$PWD/NDK/x86/bin/i686-linux-android-ar"
|
||||||
|
linker = "$PWD/NDK/x86/bin/i686-linux-android-clang"
|
11
scripts/cargo_test.sh
Executable file
11
scripts/cargo_test.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cargo test --verbose --all
|
||||||
|
cargo test --features edn/serde_support --verbose --all
|
||||||
|
# We can't pick individual features out with `cargo test --all` (At the time of this writing, this
|
||||||
|
# works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing
|
||||||
|
# this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To
|
||||||
|
# work around this, we run individual tests for each subcrate individually.
|
||||||
|
for manifest in $(find . -type f -name Cargo.toml); do
|
||||||
|
cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher
|
||||||
|
done
|
|
@ -2,4 +2,5 @@ cd ffi
|
||||||
cargo lipo --release
|
cargo lipo --release
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p sdks/swift/Mentat/External-Dependencies/
|
mkdir -p sdks/swift/Mentat/External-Dependencies/
|
||||||
|
ls -la target/release
|
||||||
cp target/universal/release/libmentat_ffi.a sdks/swift/Mentat/External-Dependencies/
|
cp target/universal/release/libmentat_ffi.a sdks/swift/Mentat/External-Dependencies/
|
||||||
|
|
Loading…
Reference in a new issue