Artifact Content
Not logged in

Artifact c5489ad685d4fed26c7fc67b21df7070453ea31d:

Unrecognized artifact
env:
  global:
    - RUST_BACKTRACE=1
    - RUST_STABLE=1.24.0
    - RUSTFLAGS="-C opt-level=2 -C codegen-units=8"
    - PATH=$PATH:$HOME/.cargo/bin
language: rust
stages:
  - stable
  - nightly-warmup
  - nightly-tests
jobs:
  include:
    # Stable
    - stage: stable
      script: set -x; scripts/stable
      os: linux
      rust: 1.24.0
    - os: linux
      script: set -x; scripts/stable
      rust: 1.24.0-i686-unknown-linux-gnu
      addons:
        apt:
          packages:
            - gcc-multilib
    - os: osx
      script: set -x; scripts/stable
      rust: 1.24.0
    # Nightly compiler warm-up + clippy
    - stage: nightly-warmup
      script: set -x; scripts/build-all
      os: linux
      rust: nightly-2018-02-05
    - script: set -x; scripts/clippy-ffi-utils && scripts/clippy-real
      os: linux
      rust: nightly-2018-02-05
    # Nightly tests + clippy
    - stage: nightly-tests
      script: set -x; scripts/test-all
      os: linux
      rust: nightly-2018-02-05
    - script: set -x; scripts/clippy-mock
      os: linux
      rust: nightly-2018-02-05
sudo: false
cache:
  cargo: true
before_script:
  # Expected version change PR title format:
  # Version change: safe_app to 0.2.2; safe_authenticator to 0.2.3; safe_core to 0.26.0;
  - if [[ "$TRAVIS_COMMIT_MESSAGE" =~ [Vv]ersion[[:space:]]change.*safe_authenticator[[:space:]]to[[:space:]]([^;]+) ]]; then
      SAFE_AUTHENTICATOR_VERSION=v$(cargo pkgid --manifest-path=safe_authenticator/Cargo.toml | sed -e "s/.*[:#]\(.*\)/\1/");
      if [[ "v${BASH_REMATCH[1]}" != $SAFE_AUTHENTICATOR_VERSION ]]; then
        echo "Version mismatch between commit message and Cargo.toml for safe_authenticator.";
        false;
      fi;
    else
      SAFE_AUTHENTICATOR_VERSION=${TRAVIS_COMMIT:0:7};
    fi
  - if [[ "$TRAVIS_COMMIT_MESSAGE" =~ [Vv]ersion[[:space:]]change.*safe_app[[:space:]]to[[:space:]]([^;]+) ]]; then
      SAFE_APP_VERSION=v$(cargo pkgid --manifest-path=safe_app/Cargo.toml | sed -e "s/.*[:#]\(.*\)/\1/");
      if [[ "v${BASH_REMATCH[1]}" != $SAFE_APP_VERSION ]]; then
        echo "Version mismatch between commit message and Cargo.toml for safe_app.";
        false;
      fi;
    else
      SAFE_APP_VERSION=${TRAVIS_COMMIT:0:7};
    fi
  - curl -sSL https://github.com/maidsafe/QA/raw/master/travis/cargo_install.sh > cargo_install.sh
  - bash cargo_install.sh cargo-prune;
  - if [[ "$TRAVIS_RUST_VERSION" == "$RUST_STABLE" && $TRAVIS_EVENT_TYPE = pull_request ]]; then
      bash cargo_install.sh rustfmt 0.9.0;
    elif [[ "$TRAVIS_RUST_VERSION" =~ nightly && $TRAVIS_EVENT_TYPE = pull_request ]]; then
      bash cargo_install.sh clippy 0.0.186;
    fi
after_script:
  - if [[ $TRAVIS_EVENT_TYPE = pull_request && -n $(git diff --shortstat 2> /dev/null | tail -n1) ]]; then
      echo "Working tree is dirty after building.  Probably Cargo.lock should be updated.";
      git status;
      travis_terminate 1;
    fi
before_cache:
  - cargo prune
before_deploy:
  - mkdir -p target/deploy
  - if [[ "$TRAVIS_RUST_VERSION" =~ i686 ]]; then
      ARCH=x86;
    else
      ARCH=x64;
    fi
  # We need to use `-x` on OS X since `strip` fails to remove global symbols from release builds on OS X.
  - if [[ "$TRAVIS_OS_NAME" = linux ]]; then
      SUFFIX=so;
    else
      SUFFIX=dylib STRIP_ARG=-x;
    fi
  # Build for mock.
  - cargo build --verbose --release --features=use-mock-routing --manifest-path=safe_authenticator/Cargo.toml
  - cargo build --verbose --release --features=use-mock-routing --manifest-path=safe_app/Cargo.toml
  - strip $STRIP_ARG target/release/libsafe_authenticator.$SUFFIX target/release/libsafe_app.$SUFFIX
  - zip -j target/deploy/safe_authenticator-mock-$SAFE_AUTHENTICATOR_VERSION-$TRAVIS_OS_NAME-$ARCH.zip target/release/libsafe_authenticator.$SUFFIX
  - zip -j target/deploy/safe_app-mock-$SAFE_APP_VERSION-$TRAVIS_OS_NAME-$ARCH.zip target/release/libsafe_app.$SUFFIX
  # Build for production.
  - cargo build --verbose --release --manifest-path=safe_authenticator/Cargo.toml
  - cargo build --verbose --release --manifest-path=safe_app/Cargo.toml
  - strip $STRIP_ARG target/release/libsafe_authenticator.$SUFFIX target/release/libsafe_app.$SUFFIX
  - zip -j target/deploy/safe_authenticator-$SAFE_AUTHENTICATOR_VERSION-$TRAVIS_OS_NAME-$ARCH.zip target/release/libsafe_authenticator.$SUFFIX
  - zip -j target/deploy/safe_app-$SAFE_APP_VERSION-$TRAVIS_OS_NAME-$ARCH.zip target/release/libsafe_app.$SUFFIX
deploy:
  provider: s3
  access_key_id: AKIAIA2TXTG7EV5VIG2Q
  secret_access_key:
    secure: qEDay6TCAy3tBLqLYFOx9OjAdoRl010paK2//teFETfwUfJA/RtNSfkp1yrgx+kZ3FO8cthdDnwR3zjM3pkCL+5mGkQMAgvRY7rcEB5H1VyO4jkZRoB4n/yUu5jB4dHdeeRWTOJxNOOPA0G1Q65LLkJql2JGoJatqE3pBmJm0X8=
  bucket: safe-client-libs
  local-dir: target/deploy
  acl: public_read
  region: eu-west-2
  skip_cleanup: true
  on:
    branch: master
    tags: false
    condition: $TRAVIS_RUST_VERSION =~ $RUST_STABLE && $TRAVIS_EVENT_TYPE = push
after_deploy: rm -rf target/deploy