2017-08-12 10:38:36 +08:00
|
|
|
sudo: true
|
2017-02-22 05:59:27 +08:00
|
|
|
|
2017-08-12 03:05:58 +08:00
|
|
|
git:
|
|
|
|
submodules: false
|
|
|
|
|
2017-08-11 12:24:12 +08:00
|
|
|
language: node_js
|
|
|
|
|
|
|
|
node_js:
|
2017-08-11 14:20:34 +08:00
|
|
|
- '6.9'
|
2017-08-11 12:24:12 +08:00
|
|
|
|
2017-02-22 05:59:27 +08:00
|
|
|
addons:
|
2017-08-11 14:36:44 +08:00
|
|
|
artifacts:
|
|
|
|
working_dir: app/dist
|
|
|
|
target_paths: client/${TRAVIS_COMMIT:0:8}/${TRAVIS_OS_NAME}
|
2017-08-12 00:20:46 +08:00
|
|
|
permissions: public-read
|
2017-08-11 14:36:44 +08:00
|
|
|
paths:
|
2017-10-04 08:12:09 +08:00
|
|
|
- mailsync.tar.gz
|
2017-09-06 04:37:40 +08:00
|
|
|
- Mailspring.dmg
|
|
|
|
- Mailspring.zip
|
2017-10-06 04:30:01 +08:00
|
|
|
- $(find . -type f -name mailspring-*.deb | tr "\n" ":")
|
|
|
|
- $(find . -type f -name mailspring-*.rpm | tr "\n" ":")
|
2017-08-11 14:36:44 +08:00
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- build-essential
|
|
|
|
- clang
|
2017-08-12 08:41:22 +08:00
|
|
|
- cmake
|
2017-11-02 00:45:54 +08:00
|
|
|
- execstack
|
2017-08-11 14:36:44 +08:00
|
|
|
- fakeroot
|
2017-08-12 10:38:36 +08:00
|
|
|
- g++-5
|
2017-08-11 14:36:44 +08:00
|
|
|
- git
|
|
|
|
- libgnome-keyring-dev
|
2017-10-10 06:08:01 +08:00
|
|
|
- libsecret-1-dev
|
2017-08-11 14:36:44 +08:00
|
|
|
- xvfb
|
|
|
|
- rpm
|
2017-08-12 08:41:22 +08:00
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- libtool
|
2017-10-05 00:46:41 +08:00
|
|
|
- libc-ares-dev
|
2017-08-12 08:41:22 +08:00
|
|
|
- libctemplate-dev
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libicu-dev
|
2017-08-11 14:36:44 +08:00
|
|
|
- libxext-dev
|
2017-08-12 08:41:22 +08:00
|
|
|
- libsasl2-dev
|
2017-10-11 03:22:18 +08:00
|
|
|
- libsasl2-modules
|
|
|
|
- libsasl2-modules-gssapi-mit
|
2017-08-12 08:41:22 +08:00
|
|
|
- libssl-dev
|
|
|
|
- libtidy-dev
|
2017-08-11 14:36:44 +08:00
|
|
|
- libxtst-dev
|
|
|
|
- libxkbfile-dev
|
2017-08-12 08:41:22 +08:00
|
|
|
- libglib2.0-dev
|
|
|
|
- libxml2-dev
|
|
|
|
- uuid-dev
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2017-08-11 12:24:12 +08:00
|
|
|
- "/ci-.*/"
|
|
|
|
- "/stable.*/"
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2017-08-15 00:13:45 +08:00
|
|
|
env: CC=gcc-5 CXX=g++-5
|
2017-02-22 05:59:27 +08:00
|
|
|
- os: osx
|
2017-08-14 01:06:24 +08:00
|
|
|
osx_image: xcode8.3
|
2017-08-15 00:13:45 +08:00
|
|
|
env: CC=clang CXX=clang++ SIGN_BUILD=true
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
before_install:
|
2017-08-13 10:34:24 +08:00
|
|
|
# Decrypt and uncompress code signing certs, etc.
|
2017-08-11 12:24:12 +08:00
|
|
|
- openssl aes-256-cbc -K $encrypted_faf2708e46e2_key -iv $encrypted_faf2708e46e2_iv
|
|
|
|
-in app/build/resources/certs.tar.enc -out app/build/resources/certs.tar -d;
|
2017-08-11 10:23:40 +08:00
|
|
|
- mkdir app/build/resources/certs;
|
2017-08-11 12:24:12 +08:00
|
|
|
- tar xvf app/build/resources/certs.tar --directory=app/build/resources/;
|
2017-08-11 10:23:40 +08:00
|
|
|
- source app/build/resources/certs/mac/set_unix_env.sh;
|
2017-08-13 10:34:24 +08:00
|
|
|
# Checkout the (currently private) C++ Mailsync codebase
|
2017-08-13 08:46:04 +08:00
|
|
|
- GIT_SSH_COMMAND='ssh -i app/build/resources/certs/mailsync-deploy-key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
2017-09-06 04:37:40 +08:00
|
|
|
SSH_ASKPASS=/Users/travis/build/Foundry376/Mailspring/app/build/resources/certs/ssh-askpass-fix
|
2017-08-13 08:46:04 +08:00
|
|
|
DISPLAY=nothing:0
|
|
|
|
git submodule update --init mailsync
|
2017-08-12 08:41:22 +08:00
|
|
|
|
2017-09-28 02:34:59 +08:00
|
|
|
before_script:
|
2017-09-28 03:44:20 +08:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi
|
2017-09-28 02:34:59 +08:00
|
|
|
|
2017-08-13 10:34:24 +08:00
|
|
|
script:
|
2017-09-01 03:27:07 +08:00
|
|
|
- npm run ci-setup-mac-keychain
|
2017-09-28 02:08:07 +08:00
|
|
|
- npm run lint
|
2017-08-13 10:34:24 +08:00
|
|
|
- mailsync/build.sh
|
2017-08-15 09:06:30 +08:00
|
|
|
- mv ./mailsync ./mailsync-src
|
2017-08-15 04:00:59 +08:00
|
|
|
- DEBUG=electron-packager,electron-osx-sign npm run build
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- node_modules
|
2017-08-13 08:46:04 +08:00
|
|
|
- app/node_modules
|
2017-10-06 03:38:23 +08:00
|
|
|
- /tmp/mailsync-build-deps
|
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
after_success:
|
|
|
|
# Grab the version number from the .deb product and update the snapcraft.yml file
|
|
|
|
- sed "s/MAILSPRING_VERSION/$(grep -E -o '([0-9]+.[0-9]+.[0-9]+)' <<< "$(find app/dist -type f -name mailspring-*.deb)")/g" snap/snapcraft.template.yaml > snap/snapcraft.yaml
|
|
|
|
# Decrypt the snapcraft login information
|
2018-10-10 05:30:27 +08:00
|
|
|
- openssl aes-256-cbc -K $encrypted_60f7ef72bfa6_key -iv $encrypted_60f7ef72bfa6_iv
|
2017-10-20 14:48:04 +08:00
|
|
|
-in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
|
2017-10-06 03:38:23 +08:00
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
services:
|
|
|
|
- docker
|
2017-10-06 03:38:23 +08:00
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
deploy:
|
|
|
|
'on':
|
|
|
|
branch: master
|
|
|
|
condition: $TRAVIS_OS_NAME = linux
|
|
|
|
provider: script
|
|
|
|
script: docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && snapcraft && snapcraft push *.snap --release edge"
|
|
|
|
skip_cleanup: true
|