Skip to content

Commit

Permalink
Build mailsync separately from Electron + Node deps so it can use sep…
Browse files Browse the repository at this point in the history
…arate a Visual Studio version
  • Loading branch information
bengotow committed Apr 18, 2022
1 parent 1b3dd14 commit d28f2ff
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 136 deletions.
15 changes: 3 additions & 12 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ install:
mkdir app/build/resources/certs;
tar xf app/build/resources/certs.tar --directory=app/build/resources/;
# Clone the submodule
- ps: |
$env:GIT_SSH_COMMAND="ssh -q -i app/build/resources/certs/mailsync-deploy-key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no";
git submodule --quiet update --init mailsync *>$null
build_script:
- cmd: npm install
- cmd: npm install --global windows-build-tools
- cmd: cd .\mailsync && .\build.cmd && cd ..\
- cmd: npm run build
- cmd: node app/build/create-signed-windows-installer.js

before_deploy:
- cmd: 7z -ttar a dummy %APPVEYOR_BUILD_FOLDER%\app\dist\*.dll %APPVEYOR_BUILD_FOLDER%\app\dist\*.pdb %APPVEYOR_BUILD_FOLDER%\app\dist\mailsync.exe -so | 7z -si -tgzip a .\app\dist\mailsync.tar.gz
- ps: Get-ChildItem .\app\dist\*.tar.gz | % { Push-AppveyorArtifact $_.FullName -FileName "win-ia32/$($_.Name)" -DeploymentName s3-deployment }
- ps: Get-ChildItem .\app\dist\MailspringSetup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "win-ia32/$($_.Name)" -DeploymentName s3-deployment }
- ps: Get-ChildItem .\app\dist\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName "win-ia32/$($_.Name)" -DeploymentName s3-deployment }
- ps: Get-ChildItem .\app\dist\RELEASES | % { Push-AppveyorArtifact $_.FullName -FileName "win-ia32/$($_.Name)" -DeploymentName s3-deployment }
Expand Down Expand Up @@ -72,6 +63,6 @@ environment:
secure: B2pwd1AlmQHjIpIau1NylfEMkwJJ5u7NhxgZcU8WicwP6+cmePnAacYIwpe1fXEf

cache:
# - node_modules -> package.json
# - app\node_modules -> app\package.json
# - '%USERPROFILE%\.npm'
- node_modules -> package.json
- app\node_modules -> app\package.json
- '%USERPROFILE%\.npm'
31 changes: 1 addition & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ addons:
target_paths: client/${TRAVIS_COMMIT:0:8}/${TRAVIS_OS_NAME}
permissions: public-read
paths:
- mailsync.tar.gz
- Mailspring.dmg
- Mailspring.zip
- $(find . -type f -name mailspring-*.deb | tr "\n" ":")
Expand All @@ -31,32 +30,9 @@ addons:
sources:
- ubuntu-toolchain-r-test
packages:
- autoconf
- automake
- build-essential
- clang
- cmake
- execstack
- fakeroot
- g++-5
- git
- libc-ares-dev
- libctemplate-dev
- libcurl4-openssl-dev
- libglib2.0-dev
- libgnome-keyring-dev
- libicu-dev
- libsasl2-dev
- libsasl2-modules
- libsasl2-modules-gssapi-mit
- libsecret-1-dev
- libssl-dev
- libtidy-dev
- libtool
- libxext-dev
- libxkbfile-dev
- libxml2-dev
- libxtst-dev
- rpm
- uuid-dev
- xvfb
Expand All @@ -71,7 +47,7 @@ matrix:
include:
- os: linux
env: CC=gcc-5 CXX=g++-5
dist: xenial
dist: bionic
- os: osx
osx_image: xcode10.1
env: CC=clang CXX=clang++ SIGN_BUILD=true
Expand All @@ -86,8 +62,6 @@ before_install:
[ "$TRAVIS_REPO_SLUG" != "Foundry376/Mailspring" ]
- source app/build/resources/certs/mac/set_unix_env.sh ||
[ "$TRAVIS_REPO_SLUG" != "Foundry376/Mailspring" ]
# Checkout the C++ Mailsync codebase
- git submodule update --init mailsync

# 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...
Expand All @@ -99,15 +73,12 @@ before_script:
script:
- 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

cache:
directories:
- node_modules
- app/node_modules
- /tmp/mailsync-build-deps-v2

after_success:
# Prepare the snapcraft environment
Expand Down
94 changes: 50 additions & 44 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mailsync
Submodule mailsync updated 2 files
+49 −0 .appveyor.yml
+74 −0 .travis.yml
Loading

0 comments on commit d28f2ff

Please sign in to comment.