Skip to content

Commit

Permalink
Merge pull request #1130 from input-output-hk/release/0.12.0
Browse files Browse the repository at this point in the history
Release/0.12.0
  • Loading branch information
nikolaglumac authored Dec 19, 2018
2 parents cd01507 + 2c642b1 commit 87e38b1
Show file tree
Hide file tree
Showing 483 changed files with 12,707 additions and 10,635 deletions.
2 changes: 2 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NIX_PATH="nixpkgs=$(nix-build fetch-nixpkgs.nix -o nixpkgs)"
export NIX_PATH
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ env:
ARTIFACT_BUCKET: s3://ci-output-sink
steps:
- label: 'daedalus-x86_64-darwin'
command: 'scripts/nix-shell.sh --run "scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER"'
command: 'scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
env:
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
agents:
system: x86_64-darwin
- label: 'daedalus-x86_64-linux'
command: 'scripts/nix-shell.sh --run "scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER"'
command: 'scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
agents:
system: x86_64-linux
- label: 'daedalus-x86_64-linux-nix'
command: 'scripts/nix-shell.sh --run "scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER"'
command: 'scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
agents:
system: x86_64-linux
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"API_VERSION": true,
"NETWORK": true,
"MOBX_DEV_TOOLS": true,
"BUILD_NUMBER": true
"BUILD_NUMBER": true,
"Process": true // TODO: remove after fix
}
}
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PROJECT_ROOT>/node_modules/electron-packager/.*
<PROJECT_ROOT>/node_modules/npm/.*
<PROJECT_ROOT>/node_modules/oboe/.*
<PROJECT_ROOT>/node_modules/jsonlint/.*
<PROJECT_ROOT>/dist/.*
<PROJECT_ROOT>/release/.*
<PROJECT_ROOT>/git/.*
Expand Down
16 changes: 8 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ This PR CHANGES.
- [ ] PR is updated to the most recent version of target branch (and there are no conflicts)
- [ ] PR has good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
- [ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub
- [ ] Automated tests: All acceptance tests are passing (`npm run test`)
- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *development* build (`npm run dev`)
- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *production* build (`npm run package` / CI builds)
- [ ] There are no *flow* errors or warnings (`npm run flow:test`)
- [ ] There are no *lint* errors or warnings (`npm run lint`)
- [ ] Automated tests: All acceptance tests are passing (`yarn run test`)
- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *development* build (`yarn run dev`)
- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *production* build (`yarn run package` / CI builds)
- [ ] There are no *flow* errors or warnings (`yarn run flow:test`)
- [ ] There are no *lint* errors or warnings (`yarn run lint`)
- [ ] Text changes are proofread and approved (Jane Wild)
- [ ] There are no missing translations (running `npm run manage:translations` produces no changes)
- [ ] There are no missing translations (running `yarn run manage:translations` produces no changes)
- [ ] UI changes look good in all themes (Alexander Rukin)
- [ ] Storybook works and no stories are broken (`npm run storybook`)
- [ ] In case of npm dependency changes both `package-lock.json` and `yarn.lock` files are updated
- [ ] Storybook works and no stories are broken (`yarn run storybook`)
- [ ] In case of dependency changes `yarn.lock` file is updated

### Code Quality
- [ ] Important parts of the code are properly documented and commented
Expand Down
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Logs

# Runtime data
pids
icon.png
*.exe
*.pid
*.seed
Expand Down Expand Up @@ -44,6 +45,10 @@ installers/tls/server
installers/DLLs
installers/libressl

# temporary certs for daedalus dev
tls/client
tls/server

# App packaged
dist
release
Expand All @@ -59,8 +64,9 @@ release
translations/messages
translations/reports

# Paper wallet ceritifcate PDF file generated by acceptance tests
# 'Screenshots' and 'Paper wallet ceritifcate PDF file' generated by acceptance tests
features/support/paper_wallet_certificates/paper-wallet-certificate.pdf
features/screenshots

# Webpack
.cache
Expand All @@ -69,9 +75,20 @@ features/support/paper_wallet_certificates/paper-wallet-certificate.pdf
build-id
ci-url
commit-id
mainnet
staging
cardano-node
configuration.yaml
log-config-prod.yaml
mainnet-genesis-dryrun-with-stakeholders.json
wallet-topology.yaml

# nix-build results
result*

# Npm
package-lock.json

# cardano public keys
public.key
public.key.lock
112 changes: 88 additions & 24 deletions CHANGELOG.md

Large diffs are not rendered by default.

122 changes: 53 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<sub>Author: [Nikola Glumac](https://github.com/nikolaglumac)<br/>Status: Active</sub>
<blockquote>
<sub>Document maintainer: Nikola Glumac<br/>Document status: Active</sub>
</blockquote>

# Daedalus
[![Build status](https://badge.buildkite.com/e173494257519752d79bb52c7859df6277c6d759b217b68384.svg?branch=master)](https://buildkite.com/input-output-hk/daedalus)
Expand All @@ -14,7 +16,7 @@ Daedalus - cryptocurrency wallet
Platform-specific build scripts facilitate building Daedalus the way it is built
by the IOHK CI:

# Linux/macOS
#### Linux/macOS

This script requires [Nix](https://nixos.org/nix/), (optionally)
configured with the [IOHK binary cache][cache].
Expand All @@ -25,7 +27,7 @@ The result can be found at `installers/csl-daedalus/daedalus-*.pkg`.

[cache]: https://github.com/input-output-hk/cardano-sl/blob/3dbe220ae108fa707b55c47e689ed794edf5f4d4/docs/how-to/build-cardano-sl-and-daedalus-from-source-code.md#nix-build-mode-recommended

# Pure Nix installer build
#### Pure Nix installer build

This will use nix to build a Linux installer. Using the [IOHK binary
cache][cache] will speed things up.
Expand All @@ -34,92 +36,74 @@ cache][cache] will speed things up.

The result can be found at `./result/daedalus-*.bin`.

# Windows

This batch file requires [Node.js](https://nodejs.org/en/download/) and
[7zip](https://www.7-zip.org/download.html).

scripts/build-installer-win64.bat

The result will can be found at `.\daedalus-*.exe`.
# Development

## Stepwise build

### Install Node.js dependencies.

```bash
$ npm install
```

## Development

Run with:

```bash
$ export CARDANO_TLS_PATH={path-to-cardano-sl}/run/tls-files/
$ npm run dev
```
`shell.nix` provides a way to load a shell with all the correct versions of all the
required dependencies for development.

*Note: requires a node version >= 8 and an npm version >= 5. This project defaults to 8.x*
## Connect to staging cluster:

### Development - with Cardano Wallet
1. Start the nix-shell with staging environment `yarn nix:staging`
2. Within the nix-shell run any command like `yarn dev`

Build and run [Cardano SL](https://github.com/input-output-hk/cardano-sl)
## Connect to Local Demo Cluster:

Build with:
### Build and Run cardano-sl Demo Cluster

```bash
$ brew install haskell-stack # OR curl -ssl https://get.haskellstack.org/ | sh
$ stack setup
$ stack install cpphs
$ brew install xz # OR sudo apt-get install xz-utils
$ brew install rocksdb # OR sudo apt-get install librocksdb-dev
$ git clone [email protected]:input-output-hk/cardano-sl.git
$ cd cardano-sl/
$ ./scripts/build/cardano-sl.sh
```
1. Install nix: `curl https://nixos.org/nix/install | sh`
2. Employ the signed IOHK binary cache:
```bash
$ sudo mkdir -p /etc/nix
$ sudo vi /etc/nix/nix.conf # ..or any other editor, if you prefer
```
and then add the following lines:
```
substituters = https://hydra.iohk.io https://cache.nixos.org/
trusted-substituters =
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspc
```
3. Build and run demo cluster: `scripts/launch/demo-nix.sh`

Run with:
### Start Daedalus Using Demo Cluster

```bash
$ tmux new-session -s cardano
$ WALLET_CLIENT_AUTH_DISABLE=1 ./scripts/launch/demo-with-wallet-api.sh
```
1. Start local cardano-sl demo cluster (`./scripts/launch/demo-nix.sh`)
2. Inspect the terminal output of cardano-sl and copy the timestamp from the message
`system start: 1537184804`
3. Start the nix-shell with development environment `yarn nix:dev 1537184804` (timestamp is
different each time you restart the cardano-sl demo cluster)
4. Within the nix-shell run any command like `yarn dev`

Stop with:
## Notes:

```bash
$ tmux kill-session -t cardano
```
`shell.nix` also provides a script for updating yarn.lock. Run `nix-shell -A fixYarnLock`
to update `yarn.lock` file.

### Development - network options
### Configuring the Network

There are three different network options you can run Daedalus in: `mainnet`, `testnet` and `development` (default).
To set desired network option use `NETWORK` environment variable:

```bash
$ NETWORK=testnet npm run dev
$ export NETWORK=testnet
$ yarn dev
```

### Testing
# Testing

You can run the test suite in two different modes:
You can find more details regarding tests setup within
[Running Daedalus acceptance tests](https://github.com/input-output-hk/daedalus/blob/master/features/README.md) README file.

**One-time run:**
For running tests once using the application in production mode:
**Notes:** Be aware that only a single Daedalus instance can run per state directory.
So you have to exit any development instances before running tests!

```bash
$ npm run test
```
# Windows

**Watch & Rerun on file changes:**
For development purposes run the tests continuously in watch mode which will re-run tests when source code changes:
This batch file requires [Node.js](https://nodejs.org/en/download/) and
[7zip](https://www.7-zip.org/download.html).

```bash
$ npm run test:watch
```
scripts/build-installer-win64.bat

You can find more details regarding tests setup within [Running Daedalus acceptance tests](https://github.com/input-output-hk/daedalus/blob/master/features/README.md) README file.
The result will can be found at `.\daedalus-*.exe`.

### CSS Modules

Expand All @@ -140,7 +124,7 @@ externals: [
]
```

For a common example, to install Bootstrap, `npm i --save bootstrap` and link them in the head of app.html
For a common example, to install Bootstrap, `yarn install --save bootstrap` and link them in the head of app.html

```html
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
Expand All @@ -156,19 +140,19 @@ externals: ['bootstrap']
## Packaging

```bash
$ npm run package
$ yarn run package
```

To package apps for all platforms:

```bash
$ npm run package:all
$ yarn run package:all
```

To package apps with options:

```bash
$ npm run package -- --[option]
$ yarn run package -- --[option]
```

### Options
Expand Down
17 changes: 17 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
status = [
# Buildkite: osx/linux installers
"buildkite/daedalus",

# Appveyor: windows installers
"continuous-integration/appveyor/branch",

# Hydra: we just care about tests attribute set
"ci/hydra:serokell:daedalus:tests.runFlow",
"ci/hydra:serokell:daedalus:tests.runLint",
"ci/hydra:serokell:daedalus:tests.runShellcheck"
]
timeout_sec = 7200
required_approvals = 1
cut_body_after = "## Type of change"
delete_merged_branches = true
block_labels = [ "DO NOT MERGE", "WIP" ]
4 changes: 2 additions & 2 deletions cardano-sl-src.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"url": "https://github.com/input-output-hk/cardano-sl",
"rev": "a956b5cfaf9165651a1ed7c9e9dc1c790e5b0d95",
"sha256": "1qg8s99l1wvch1qyw48scg6j6bf7f68xjplpw5gg3np86gxk55za",
"rev": "6a13344867b285b93e27d9ae0b1dedef2b202ddd",
"sha256": "11cql2f3j33wc5ljp5r3r4nvn3s8kcy7578n11k1ynx04dwb2c9l",
"fetchSubmodules": false
}
Loading

0 comments on commit 87e38b1

Please sign in to comment.