Skip to content

Commit

Permalink
Renable ios builds, copy headerfile when deploying.
Browse files Browse the repository at this point in the history
  • Loading branch information
pietgeursen committed May 12, 2020
1 parent 100e4f0 commit d3c4b21
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/target/
**/*.rs.bk
Cargo.lock
42 changes: 15 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ language: rust
services: docker
sudo: required

# TODO Rust builds on stable by default, this can be
# overridden on a case by case basis down below.

env:
global:
- CRATE_NAME=bamboo-rs

matrix:
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
include:
# Android
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
Expand All @@ -30,21 +25,21 @@ matrix:
rust: nightly

# iOS
# - env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
# rust: nightly
# os: osx
# - env: TARGET=armv7-apple-ios DISABLE_TESTS=1
# rust: nightly
# os: osx
# - env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
# rust: nightly
# os: osx
# - env: TARGET=i386-apple-ios DISABLE_TESTS=1
# rust: nightly
# os: osx
# - env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
# rust: nightly
# os: osx
- env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
rust: nightly
os: osx
- env: TARGET=armv7-apple-ios DISABLE_TESTS=1
rust: nightly
os: osx
- env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
rust: nightly
os: osx
- env: TARGET=i386-apple-ios DISABLE_TESTS=1
rust: nightly
os: osx
- env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
rust: nightly
os: osx

# Linux
- env: TARGET=aarch64-unknown-linux-gnu
Expand Down Expand Up @@ -134,16 +129,9 @@ before_deploy:
- sh ci/before_deploy.sh

deploy:
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
# - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789
# - Paste the output down here
file_glob: true
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
on:
# TODO Here you can pick which targets will generate binary releases
# In this example, there are some targets that are tested using the stable
# and nightly channels. This condition makes sure there is only one release
# for such targets and that's generated using the stable channel
condition: $TRAVIS_RUST_VERSION = nightly
tags: true
provider: releases
Expand Down
7 changes: 4 additions & 3 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@ main() {

test -f Cargo.lock || cargo generate-lockfile

# TODO generate the c headerfile and copy it too.
if [ -z $IS_NO_STD ]
then
cross build --target $TARGET --release
cp target/$TARGET/release/bamboo-cli $stage/ || true
cp target/$TARGET/release/bamboo-cli.exe $stage/ || true
cp target/$TARGET/release/bamboo-cli.exe $stage/ || true # windows
cp target/$TARGET/release/libbamboo_core.a $stage/ || true
cp target/$TARGET/release/libbamboo_core.so $stage/ || true # this would fail for musl builds so fail quietly
cp target/$TARGET/release/libbamboo_core.dll $stage/ || true # if we're windows
cp target/$TARGET/release/bamboo_core.dll $stage/ || true # if we're windows
else
cd bamboo-core
cross build -p bamboo-core --target $TARGET --release --no-default-features
cp target/$TARGET/release/libbamboo_core.a $stage/
cd ..
fi

#strip target/$TARGET/release
cp $src/bamboo-core/libbamboo.h $stage/

cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
Expand Down

0 comments on commit d3c4b21

Please sign in to comment.