Skip to content

Commit

Permalink
move to protonmail web client v4
Browse files Browse the repository at this point in the history
* also update dependencies including @electron 6.1.7 => 7.1.8 bump
  • Loading branch information
vladimiry committed Jan 10, 2020
1 parent cd04270 commit e1b17b8
Show file tree
Hide file tree
Showing 146 changed files with 3,514 additions and 2,634 deletions.
151 changes: 100 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
only:
- master
language: node_js
node_js: 12.4.0
node_js: 12.14.0
cache:
yarn: false
npm: false
Expand All @@ -14,42 +14,101 @@ cache:
env:
global:
- MOZ_HEADLESS=1 # needed for karma tests running in headless mode

embedding-linux-common: &embedding-linux-common-anchor
os: linux
# TODO use "xenial" dist, running auto login e2e test using "node-keytar" is a blocker at the moment
# https://travis-ci.community/search?q=No%20output%20has%20been%20received%20in%20the%20last%20windows%20category%3A16
dist: trusty
group: stable
sudo: required
services:
- docker
addons:
apt:
sources:
# upgrade GCC to a more recent version, see https://docs.travis-ci.com/user/languages/cpp/#gcc-on-linux
- ubuntu-toolchain-r-test
packages:
# for native modules compiling/rebuilding
- g++-7
# for rebuilding "desktop-idle" native module
- libxss-dev
# for rebuilding "node-keytar" native module
- gnome-keyring
- libgnome-keyring-dev
- libsecret-1-dev
# for initializing keychain for running e2e tests that use "node-keytar"
- python-gnomekeyring
# for building snap ("unsquashfs" binary)
- squashfs-tools
firefox: latest

embedding-macos-common: &embedding-embedding-macos-common
os: osx
osx_image: xcode9.4

before_install:
- | # installing the most recent yarn version
curl -o- -L https://yarnpkg.com/install.sh | bash;
export PATH="$HOME/.yarn/bin:$PATH";
install:
- node --version
- npm --version
- yarn --version
- npx envinfo
- yarn install --pure-lockfile
after_failure:
- tar -cvf e2e-logs.tar ./output/e2e
- yarn scripts/transfer upload e2e-logs.tar
notifications:
email:
on_success: never
on_failure: change

jobs:
include:
# web clients building process split in part-1/part-2 steps
# to workaround the issue of travis dropping long-running jobs on free plan
# "workspaces" features is used to ensure that "web clients-artifact" is actually shared between jobs ("cache" doesn't always help)
- stage: 'Build web clients (part-1)'
<<: *embedding-linux-common-anchor
workspaces:
create:
name: 'webclients-artifact-linux'
paths:
- output/git
env:
- ELECTRON_MAIL_PREPARE_WEBCLIENTS_REPOS_ONLY="WebClient;proton-mail-settings"
script: ./scripts/ci/prepare-webclients.sh
- stage: 'Build web clients (part-2)'
<<: *embedding-linux-common-anchor
workspaces:
use: 'webclients-artifact-linux'
env:
- ELECTRON_MAIL_PREPARE_WEBCLIENTS_REPOS_ONLY="proton-contacts;proton-calendar"
script: ./scripts/ci/prepare-webclients.sh
- stage: 'Build web clients (part-1)'
<<: *embedding-embedding-macos-common
workspaces:
create:
name: 'webclients-artifact-macos'
paths:
- output/git
env:
- ELECTRON_MAIL_PREPARE_WEBCLIENTS_REPOS_ONLY="WebClient;proton-mail-settings"
script: ./scripts/ci/prepare-webclients.sh
- stage: 'Build web clients (part-2)'
<<: *embedding-embedding-macos-common
workspaces:
use: 'webclients-artifact-macos'
env:
- ELECTRON_MAIL_PREPARE_WEBCLIENTS_REPOS_ONLY="proton-contacts;proton-calendar"
script: ./scripts/ci/prepare-webclients.sh
- stage: 'Build app'
os: osx
osx_image: xcode9.4
addons:
firefox: latest
script: ./scripts/ci/travis/build-osx.sh
- stage: 'Build app'
os: linux
# TODO use "xenial" dist, running auto login e2e test using "node-keytar" is a blocker at the moment
# https://travis-ci.community/search?q=No%20output%20has%20been%20received%20in%20the%20last%20windows%20category%3A16
dist: trusty
group: stable
sudo: required
services:
- docker
addons:
apt:
sources:
# upgrade GCC to a more recent version, see https://docs.travis-ci.com/user/languages/cpp/#gcc-on-linux
- ubuntu-toolchain-r-test
packages:
# for native modules compiling/rebuilding
- g++-7
# for rebuilding "desktop-idle" native module
- libxss-dev
# for rebuilding "node-keytar" native module
- gnome-keyring
- libgnome-keyring-dev
- libsecret-1-dev
# for initializing keychain for running e2e tests that use "node-keytar"
- python-gnomekeyring
# for building snap ("unsquashfs" binary)
- squashfs-tools
firefox: latest
<<: *embedding-linux-common-anchor
workspaces:
use: 'webclients-artifact-linux'
before_script:
- | # needed for native modules compiling/rebuilding
export CC=gcc-7 CXX=g++-7;
Expand All @@ -65,20 +124,10 @@ jobs:
eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start);
/usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');";
script: ./scripts/ci/travis/build-linux.sh
before_install:
- | # installing the most recent yarn version
curl -o- -L https://yarnpkg.com/install.sh | bash;
export PATH="$HOME/.yarn/bin:$PATH";
install:
- node --version
- npm --version
- yarn --version
- npx envinfo
- yarn install --pure-lockfile
after_failure:
- tar -cvf e2e-logs.tar ./output/e2e
- yarn scripts/transfer upload e2e-logs.tar
notifications:
email:
on_success: never
on_failure: change
- stage: 'Build app'
<<: *embedding-embedding-macos-common
workspaces:
use: 'webclients-artifact-macos'
addons:
firefox: latest
script: ./scripts/ci/travis/build-osx.sh
11 changes: 6 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# TODO improve artifacts sharng between the jobs, keep track of the following issues:
# TODO improve artifacts sharing between the jobs, keep track of the following issues:
# - https://github.com/appveyor/ci/issues/2438
# - https://github.com/appveyor/ci/issues/1623
branches:
only:
- master
- master
skip_tags: true
image:
# TODO try using "appveyor" for building all platforms packages and drop "travis-ci" use then
# items order matters
- 'Ubuntu1804'
- 'Visual Studio 2017'
Expand Down Expand Up @@ -46,18 +47,18 @@ for:
build_script:
- ps: | # download and extract prepared by linux job web clients
$headers = @{
"Authorization" = "Bearer $EMAIL_SECURELY_APP_APPVEYOR_API_KEY"
"Authorization" = "Bearer $env:ELECTRON_MAIL_APPVEYOR_API_KEY"
"Content-type" = "application/json"
}
$project = Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG" -Headers $headers -Method GET
$linuxJob = $project.build.jobs | where { $_.name -eq $env:LINUX_JOB_NAME_PATTERN }
$linuxJobId = $linuxJob.jobId;
$linuxJobCompleted = $linuxJob.status -eq "success"
if (!$linuxJobCompleted){
if (!$linuxJobCompleted) {
throw "Job `"$env:LINUX_JOB_NAME_PATTERN`" has been finished with `"$linuxJob.status`" status"
}
if (!$linuxJobId) {
throw "Failed to resolve i`"$env:LINUX_JOB_NAME_PATTERN`" job id"
throw "Failed to resolve `"$env:LINUX_JOB_NAME_PATTERN`" job id"
}
Start-FileDownload https://ci.appveyor.com/api/buildjobs/$linuxJobId/artifacts/$env:LINUX_JOB_ARTIFACT_TAR
7z x $env:LINUX_JOB_ARTIFACT_TAR
Expand Down
2 changes: 1 addition & 1 deletion linting-extending/tslint/tslint-rules-bunch.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"target": [
"src/electron-preload/webview/**/*",
"!src/electron-preload/webview/util.ts"
"!src/electron-preload/webview/lib/util.ts"
],
"from": [
"src/shared/api/main"
Expand Down

0 comments on commit e1b17b8

Please sign in to comment.