Compare commits

...

28 commits

Author SHA1 Message Date
Emily Toop
8287dd308c Add iOS build task 2018-08-08 17:00:36 +01:00
Emily Toop
2ab340155a Add iOS build task 2018-08-08 16:29:36 +01:00
Emily Toop
148fdd4aa4 Add iOS build task 2018-08-08 15:52:30 +01:00
Emily Toop
468899d36e Add iOS build task 2018-08-08 15:13:09 +01:00
Emily Toop
d724cc03fe Add iOS build task 2018-08-08 15:02:56 +01:00
Emily Toop
2ddb5fd3f4 Add iOS build task 2018-08-08 14:53:56 +01:00
Emily Toop
9d4892a1c1 Add iOS build task 2018-08-08 14:46:29 +01:00
Emily Toop
2bf95b6d1b Add iOS build task 2018-08-08 14:42:01 +01:00
Emily Toop
0ed6001857 Add iOS build task 2018-08-08 14:41:37 +01:00
Emily Toop
9154303fa1 Add iOS build task 2018-08-08 14:32:31 +01:00
Emily Toop
49c24af9cc Add iOS build task 2018-08-08 13:57:59 +01:00
Emily Toop
5bcbfd41b2 Add iOS build task 2018-08-08 12:07:25 +01:00
Emily Toop
cf79e98296 Add iOS build task 2018-08-08 12:04:20 +01:00
Emily Toop
fda02a6364 Add iOS build task 2018-08-08 11:58:41 +01:00
Emily Toop
3b90e376b9 Add iOS build task 2018-08-08 11:21:08 +01:00
Emily Toop
5180a3f899 Add iOS build task 2018-08-07 18:53:55 +01:00
Emily Toop
3f7e808f4b Add iOS build task 2018-08-07 18:48:41 +01:00
Emily Toop
a5fd51f6be Add iOS build task 2018-08-07 17:41:47 +01:00
Emily Toop
5e2e381125 Add iOS build task 2018-08-07 17:40:25 +01:00
Emily Toop
21e9e9a229 Add iOS build task 2018-08-07 17:10:44 +01:00
Emily Toop
120326ae75 Add iOS build task 2018-08-07 16:37:14 +01:00
Emily Toop
a121f2a0eb Add iOS build task 2018-08-07 15:42:53 +01:00
Emily Toop
76d1acdedf Add iOS build task 2018-08-07 15:07:24 +01:00
Emily Toop
06ea759fca Add iOS build task 2018-08-07 15:04:38 +01:00
Emily Toop
7900da614c Remove superflous script 2018-08-07 15:02:58 +01:00
Emily Toop
b4a50767c6 Add android build step 2018-08-07 14:55:33 +01:00
Emily Toop
92f7a527f0 Move test to script 2018-08-07 11:27:35 +01:00
Emily Toop
70501eb720 Make Rust a section 2018-08-07 11:24:47 +01:00
4 changed files with 90 additions and 32 deletions

View file

@ -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:
fast_finish: true
allow_failures:
- rust: nightly
fast_finish: true
script:
- 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
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
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:
- >
cd ffi &&
cargo lipo --release &&
cd ..
- cd sdks/swift/Mentat
- xcodebuild -configuration Debug -scheme "Mentat Debug" -sdk iphonesimulator test -destination 'platform=iOS Simulator,name=iPhone X,OS=11.4'
- cd ../../..

11
cargo-config.toml.template Executable file
View 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
View 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

View file

@ -2,4 +2,5 @@ cd ffi
cargo lipo --release
cd ..
mkdir -p sdks/swift/Mentat/External-Dependencies/
ls -la target/release
cp target/universal/release/libmentat_ffi.a sdks/swift/Mentat/External-Dependencies/