Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4016 from ethereum/rebuild-windows
Browse files Browse the repository at this point in the history
"Buidl" changes
  • Loading branch information
evertonfraga authored Jul 23, 2018
2 parents 23afd2e + eed0753 commit 490f9a2
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 697 deletions.
62 changes: 5 additions & 57 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,14 @@ linux_dependencies: &linux_dependencies
sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib icnsutils xz-utils &&
sudo apt-get install graphicsmagick
windows_dependencies: &windows_dependencies
name: Windows package dependencies
command: |
sudo apt-get install software-properties-common &&
sudo dpkg --add-architecture i386 &&
sudo add-apt-repository ppa:ubuntu-wine/ppa -y &&
sudo apt-get install --no-install-recommends -y mono-devel nsis ca-certificates-mono wine1.8
install_meteor: &install_meteor
name: Installing Meteor
# PATH=$PATH:$HOME/.meteor && curl -L https://raw.githubusercontent.com/arunoda/travis-ci-meteor-packages/1390e0f96162d0d70fc1e60a6b0f4f891a0e8f42/configure.sh | /bin/sh
command: which meteor || curl https://install.meteor.com | /bin/sh

install_node_modules: &install_node_modules
name: Installing node modules using yarn
command: yarn global add gulp-cli meteor-build-client && yarn
name: Installing node dependencies using yarn
command: yarn


# Javascript Node CircleCI 2.0 configuration file
Expand Down Expand Up @@ -96,8 +88,7 @@ jobs:
- run:
<<: *install_node_modules

- run: yarn run gulp --linux
- run: yarn run gulp verify-artifacts --mist --linux
- run: yarn build:mist --linux

- store_artifacts:
path: dist_mist/release
Expand All @@ -115,50 +106,7 @@ jobs:
- run:
<<: *install_node_modules

- run: yarn run gulp --wallet --linux
- run: yarn run gulp verify-artifacts --wallet --linux

- store_artifacts:
path: dist_wallet/release

mist-windows:
<<: *defaults
steps:
- attach_workspace:
at: /home/circleci/

- run:
<<: *linux_dependencies
- run:
<<: *windows_dependencies
- run:
<<: *install_meteor
- run:
<<: *install_node_modules

- run: yarn run gulp --win
- run: yarn run gulp verify-artifacts --mist --win

- store_artifacts:
path: dist_mist/release

wallet-windows:
<<: *defaults
steps:
- attach_workspace:
at: /home/circleci/

- run:
<<: *linux_dependencies
- run:
<<: *windows_dependencies
- run:
<<: *install_meteor
- run:
<<: *install_node_modules

- run: yarn run gulp --wallet --win
- run: yarn run gulp verify-artifacts --wallet --win
- run: yarn build:wallet --linux

- store_artifacts:
path: dist_wallet/release
Expand All @@ -169,7 +117,7 @@ jobs:
steps:
- attach_workspace:
at: /home/circleci/
- run: xvfb-run yarn run gulp test
- run: xvfb-run yarn test:e2e

unit-test:
<<: *defaults
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "dapp-styles"]
path = interface/public/dapp-styles
url = git://github.com/ethereum/dapp-styles.git
[submodule "meteor-dapp-wallet"]
path = meteor-dapp-wallet
url = https://github.com/ethereum/meteor-dapp-wallet.git
95 changes: 24 additions & 71 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,107 +8,60 @@ cache:

sudo: required

addons:
artifacts:
debug: true
paths:
- dist_mist/release/*
- dist_wallet/release/*

matrix:
include:
# WINDOWS cross-built from linux
- os: linux
dist: trusty
env:
- GULP_PLATFORM=win
addons:
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- nsis
- g++-multilib
sources:
- mono
before_install:
- sudo dpkg --add-architecture i386 && sudo add-apt-repository ppa:ubuntu-wine/ppa -y
- sudo apt-get update -q
- sudo apt-get install --no-install-recommends -y mono-devel ca-certificates-mono wine1.8

# LINUX
- os: linux
dist: trusty
env:
- GULP_PLATFORM=linux
addons:
artifacts:
paths:
- $( ls dist_{mist,wallet}/release/* | tr "\n" ":" )
apt:
packages:
- icnsutils
- graphicsmagick
- xz-utils
- gcc-multilib
- g++-multilib

before_install:
# prepare integration tests
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start

# MAC
- os: osx
osx_image: xcode8.3 # currently xcode8.1+ doesn't support electron-builder macOS code-signing (https://github.com/electron-userland/electron-builder/issues/820#issuecomment-267777060)
osx_image: xcode8.3
env:
- GULP_PLATFORM=mac
addons:
artifacts:
paths:
- $( ls dist_{mist,wallet}/release/* | tr "\n" ":" )
before_install:
- npm install -g yarn # macOS xcode8 image doesn't natively support yarn yet

allow_failures:
- os: osx

fast_finish: true

- npm install -g yarn

install:
- echo $PATH
- PATH=$PATH:$HOME/.meteor && curl -L https://raw.githubusercontent.com/arunoda/travis-ci-meteor-packages/1390e0f96162d0d70fc1e60a6b0f4f891a0e8f42/configure.sh | /bin/sh
- export PATH=$PATH:`yarn global bin`
- yarn global add gulp-cli meteor-build-client electron@1.8.4

- yarn

script:
# disable macOS code-signing (production certificate) on develop branch
# only code signs when on master
- if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi
# windows code-signing on master branch
- if [[ $GULP_PLATFORM == "win" && $TRAVIS_BRANCH == "master" ]]; then export CSC_LINK=$CSC_WIN_LINK && CSC_KEY_PASSWORD=$CSC_WIN_KEY_PASSWORD; fi

# unit test
- if [[ $GULP_PLATFORM == "linux" ]]; then yarn test:unit:once; fi
script:
- yarn test:unit:once

# build mist
- if [[ $GULP_PLATFORM == "mac" ]]; then travis_wait 60 gulp --$GULP_PLATFORM; fi # increase timeout for slower mac builds
- if [[ $GULP_PLATFORM != "mac" ]]; then gulp --$GULP_PLATFORM; fi
- yarn build:mist --$GULP_PLATFORM

# assert creation of Mist artifacts
- gulp verify-artifacts --mist --$GULP_PLATFORM

# build wallet if on master branch
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp --wallet --$GULP_PLATFORM; fi
- yarn build:wallet --$GULP_PLATFORM

# assert creation of Wallet artifacts
- if [[ $TRAVIS_BRANCH == "master" ]]; then gulp verify-artifacts --wallet --$GULP_PLATFORM; fi

# prepare integration tests
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi

# currently, tests should run in linux and mac
- if [[ $GULP_PLATFORM != "win" ]]; then gulp test; fi
- yarn test:e2e

after_success:
#- if [[ $TRAVIS_BRANCH == "master" ]]; then gulp upload-queue --$GULP_PLATFORM && gulp upload-queue --wallet --$GULP_PLATFORM; fi
- gulp upload-queue --$GULP_PLATFORM && gulp upload-queue --wallet --$GULP_PLATFORM

- if [[ $TRAVIS_BRANCH == "master" ]]; then
yarn dist:mist --$GULP_PLATFORM;
yarn dist:wallet --$GULP_PLATFORM;
fi

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/33972d9e627a142c57a6
on_success: change
on_failure: always
on_start: never
51 changes: 19 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ $ cd mist
$ yarn
```

To update Mist in the future, run:

```bash
$ cd mist
$ git pull
$ yarn
```

### Run Mist

For development we start the interface with a Meteor server for auto-reload etc.
Expand Down Expand Up @@ -206,13 +198,13 @@ $ brew install gnu-tar libicns graphicsmagick xz
To generate the binaries for Mist run:

```bash
$ gulp
$ yarn build:mist
```

To generate the Ethereum Wallet:

```bash
$ gulp --wallet
$ yarn build:wallet
```

The generated binaries will be under `dist_mist/release` or `dist_wallet/release`. From 0.11.0, both Ethereum Wallet and Mist bundle a meteor-dapp-wallet instance (https://github.com/ethereum/meteor-dapp-wallet).
Expand All @@ -224,41 +216,35 @@ The generated binaries will be under `dist_mist/release` or `dist_wallet/release
To build binaries for specific platforms (default: all available) use the following flags:

```bash
$ gulp --mac # mac
$ gulp --linux # linux
$ gulp --win # windows
$ yarn build:mist --mac # mac
$ yarn build:mist --linux # linux
$ yarn build:mist --win # windows
```

##### walletSource

With the `walletSource` you can specify the Wallet branch to use, default is `master`:

$ gulp --wallet --walletSource local

Options are:

- `master`
- [any meteor-dapp-wallet branch](https://github.com/ethereum/meteor-dapp-wallet/branches)
- `local` Will try to build the wallet from [mist/]../meteor-dapp-wallet/app

_Note: applicable only when combined with `--wallet`_

##### skipTasks

When building a binary, you can optionally skip some tasks — generally for testing purposes.

```bash
$ gulp --mac --skipTasks=bundling-interface,release-dist
$ yarn build:mist --mac --skipTasks=bundling-interface,release-dist
```

##### Checksums

Spits out the MD5 checksums of the distributables.
Prints the SHA-256 checksums of the distributables.

It expects installer/zip files to be in the generated folders e.g. `dist_mist/release`

```bash
$ gulp checksums [--wallet]
$ yarn task checksums [--wallet]
```

#### Tasks found in gulpfile.js and gulpTasks/

Any other gulp task can be run using `yarn task`.

```bash
$ yarn task clean-dist
```

#### Cutting a release
Expand All @@ -284,13 +270,14 @@ Tests run using [Spectron](https://github.com/electron/spectron/), a webdriver.i
First make sure to build Mist with:

```bash
$ gulp
$ yarn build:mist
```

Then run the tests:

```bash
$ gulp test
$ yarn test:unit:once
$ yarn test:e2e
```

_Note: Integration tests are not yet supported on Windows._
Loading

0 comments on commit 490f9a2

Please sign in to comment.