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:
|
2021-02-15 07:14:39 +08:00
|
|
|
- '11'
|
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:
|
2019-03-27 13:02:39 +08:00
|
|
|
- mailsync.tar.gz
|
|
|
|
- Mailspring.dmg
|
|
|
|
- Mailspring.zip
|
|
|
|
- $(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:
|
2019-03-27 13:02:39 +08:00
|
|
|
- ubuntu-toolchain-r-test
|
2017-08-11 14:36:44 +08:00
|
|
|
packages:
|
2021-04-14 12:21:47 +08:00
|
|
|
- autoconf
|
|
|
|
- automake
|
2019-03-27 13:02:39 +08:00
|
|
|
- build-essential
|
|
|
|
- clang
|
2021-04-14 12:21:47 +08:00
|
|
|
- cmake
|
2019-03-27 13:02:39 +08:00
|
|
|
- execstack
|
|
|
|
- fakeroot
|
2021-04-14 12:21:47 +08:00
|
|
|
- g++-5
|
2019-03-27 13:02:39 +08:00
|
|
|
- git
|
2021-04-14 12:21:47 +08:00
|
|
|
- libc-ares-dev
|
|
|
|
- libctemplate-dev
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libglib2.0-dev
|
2019-03-27 13:02:39 +08:00
|
|
|
- libgnome-keyring-dev
|
2021-04-14 12:21:47 +08:00
|
|
|
- libicu-dev
|
|
|
|
- libsasl2-dev
|
|
|
|
- libsasl2-modules
|
|
|
|
- libsasl2-modules-gssapi-mit
|
2019-03-27 13:02:39 +08:00
|
|
|
- libsecret-1-dev
|
2021-04-14 12:21:47 +08:00
|
|
|
- libssl-dev
|
|
|
|
- libtidy-dev
|
|
|
|
- libtool
|
2019-03-27 13:02:39 +08:00
|
|
|
- libxext-dev
|
|
|
|
- libxkbfile-dev
|
2021-04-14 12:21:47 +08:00
|
|
|
- libxml2-dev
|
|
|
|
- libxtst-dev
|
|
|
|
- rpm
|
|
|
|
- uuid-dev
|
|
|
|
- xvfb
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
2019-03-27 13:02:39 +08:00
|
|
|
- master
|
2020-05-19 11:47:40 +08:00
|
|
|
- '/ci-.*/'
|
|
|
|
- '/stable.*/'
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
2019-03-27 13:02:39 +08:00
|
|
|
- os: linux
|
2021-04-14 12:21:47 +08:00
|
|
|
env: CC=gcc-5 CXX=g++-5
|
|
|
|
dist: xenial
|
2019-03-27 13:02:39 +08:00
|
|
|
- os: osx
|
2019-10-29 23:48:50 +08:00
|
|
|
osx_image: xcode10.1
|
2019-03-27 13:02:39 +08:00
|
|
|
env: CC=clang CXX=clang++ SIGN_BUILD=true
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
before_install:
|
2019-03-27 13:02:39 +08:00
|
|
|
# Decrypt and uncompress code signing certs, etc.
|
|
|
|
- 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;
|
|
|
|
- mkdir app/build/resources/certs;
|
|
|
|
- tar xvf app/build/resources/certs.tar --directory=app/build/resources/;
|
|
|
|
- source app/build/resources/certs/mac/set_unix_env.sh;
|
2021-04-14 12:22:26 +08:00
|
|
|
# Checkout the C++ Mailsync codebase
|
|
|
|
- git submodule update --init mailsync
|
2017-08-12 08:41:22 +08:00
|
|
|
|
2021-04-11 11:31:59 +08:00
|
|
|
# Resolves https://travis-ci.community/t/npm-ci-will-fail-if-cached-dependency-includes-npm/4203/6
|
|
|
|
# Don't run the copy of npm inside node_modules when erasing + building the node_modules...
|
|
|
|
install: PATH=$(echo "$PATH" | sed 's/.\/node_modules\/.bin://') npm ci
|
|
|
|
|
2017-09-28 02:34:59 +08:00
|
|
|
before_script:
|
2021-04-14 12:21:47 +08:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then Xvfb :99 & export DISPLAY=:99.0; fi
|
2017-09-28 02:34:59 +08:00
|
|
|
|
2017-08-13 10:34:24 +08:00
|
|
|
script:
|
2019-03-27 13:02:39 +08:00
|
|
|
- npm run ci-setup-mac-keychain
|
|
|
|
- npm run lint
|
|
|
|
- mailsync/build.sh
|
|
|
|
- mv ./mailsync ./mailsync-src
|
|
|
|
- DEBUG=electron-packager,electron-osx-sign npm run build
|
2017-02-22 05:59:27 +08:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2019-03-27 13:02:39 +08:00
|
|
|
- node_modules
|
|
|
|
- app/node_modules
|
2020-05-19 12:11:30 +08:00
|
|
|
- /tmp/mailsync-build-deps-v2
|
2019-03-27 13:02:39 +08:00
|
|
|
- /var/lib/docker/aufs
|
2017-10-06 03:38:23 +08:00
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
after_success:
|
2019-03-27 13:02:39 +08:00
|
|
|
# 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
|
2021-01-20 02:14:41 +08:00
|
|
|
- openssl aes-256-cbc -K $encrypted_d506bd5213c4_key -iv $encrypted_d506bd5213c4_iv -in .snapcraft/credentials.enc -out .snapcraft/credentials -d
|
2017-10-06 03:38:23 +08:00
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
services:
|
2019-03-27 13:02:39 +08:00
|
|
|
- docker
|
2017-10-06 03:38:23 +08:00
|
|
|
|
2017-10-20 14:48:04 +08:00
|
|
|
deploy:
|
2020-05-19 11:47:40 +08:00
|
|
|
'on':
|
2017-10-20 14:48:04 +08:00
|
|
|
branch: master
|
|
|
|
condition: $TRAVIS_OS_NAME = linux
|
|
|
|
provider: script
|
2021-01-20 04:26:55 +08:00
|
|
|
script: docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && snapcraft && snapcraft login --with .snapcraft/credentials && (snapcraft push *.snap --release edge || true)"
|
2017-10-20 14:48:04 +08:00
|
|
|
skip_cleanup: true
|