2019-01-24 11:22:27 -08:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
2019-02-15 09:22:55 -08:00
|
|
|
install_deps:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: yarn config delete proxy
|
|
|
|
- run: yarn install
|
|
|
|
- save_cache:
|
|
|
|
key: zec-dependencies-cache-{{ checksum "yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- /usr/local/share/.cache/yarn/v2
|
|
|
|
- ./node_modules
|
|
|
|
|
2019-01-24 11:22:27 -08:00
|
|
|
test:
|
|
|
|
docker:
|
|
|
|
- image: electronuserland/builder:wine-chrome
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-02-15 09:22:55 -08:00
|
|
|
- restore_cache:
|
|
|
|
key: zec-dependencies-cache-{{ checksum "yarn.lock" }}
|
2019-01-25 12:06:54 -08:00
|
|
|
- run: apt-get -y update
|
2019-01-25 12:09:05 -08:00
|
|
|
- run: apt install -y software-properties-common
|
2019-01-25 12:04:43 -08:00
|
|
|
- run: add-apt-repository ppa:jonathonf/ffmpeg-4
|
2019-01-24 11:22:27 -08:00
|
|
|
- run: apt-get -y update
|
|
|
|
- run: apt-get -y install libusb-1.0-0-dev graphicsmagick libudev-dev
|
2019-01-25 05:43:11 -08:00
|
|
|
- run: apt-get -y install tmux xvfb libxtst6 libxss1 libgtk2.0-0 libnss3 libasound2 libgconf-2-4 ffmpeg frei0r-plugins
|
2019-01-24 11:22:27 -08:00
|
|
|
- run:
|
|
|
|
name: Run Webpack
|
|
|
|
command: yarn dev
|
|
|
|
background: true
|
|
|
|
- run:
|
|
|
|
name: Run Mock RPC API
|
|
|
|
command: yarn e2e:serve
|
|
|
|
background: true
|
|
|
|
- run: yarn wait-on http://localhost:8080 && yarn wait-on http://localhost:18232
|
2019-01-25 12:35:51 -08:00
|
|
|
- run:
|
|
|
|
command: Xvfb :44 -auth /tmp/xvfb.auth -ac -screen 0 1024x768x24 -listen tcp
|
|
|
|
background: true
|
|
|
|
- run:
|
2019-01-25 12:42:29 -08:00
|
|
|
command: ffmpeg -y -f x11grab -video_size 1024x768 -i :44 -codec:v libx264 -r 12 /tmp/e2e-record.mp4
|
2019-01-25 12:35:51 -08:00
|
|
|
background: true
|
|
|
|
- run: DISPLAY=:44 yarn e2e:run
|
2019-01-25 12:48:29 -08:00
|
|
|
- run: |
|
|
|
|
kill -s SIGINT $(pgrep ffmpeg)
|
|
|
|
sleep 10
|
|
|
|
kill -s SIGTERM $(pgrep Xvfb)
|
2019-01-24 13:35:54 -08:00
|
|
|
- store_artifacts:
|
2019-01-24 14:47:00 -08:00
|
|
|
path: /tmp/e2e-record.mp4
|
2019-01-24 13:37:54 -08:00
|
|
|
destination: e2e-record.mp4
|
2019-02-15 09:22:55 -08:00
|
|
|
|
2019-01-31 07:51:59 -08:00
|
|
|
build_linux:
|
|
|
|
docker:
|
|
|
|
- image: electronuserland/builder:wine-chrome
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: zec-dependencies-cache-{{ checksum "yarn.lock" }}
|
|
|
|
- run: yarn electron:dist -l
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./dist/zec-react-wallet_0.3.0_amd64.deb
|
|
|
|
destination: zec-react-wallet_0.3.0_amd64.deb
|
2019-02-15 09:44:35 -08:00
|
|
|
- run:
|
|
|
|
name: Upload to Slack
|
|
|
|
command: |
|
|
|
|
export GIT_COMMIT_DESC=$(git log --format=oneline -n 1 | sed -E 's/^[^ ]+ (.*)$/\1/g')
|
2019-02-15 09:54:17 -08:00
|
|
|
curl -F file=@dist/zec-react-wallet_0.3.0_amd64.deb -F channels=$SLACK_CHANNEL -F token=$SLACK_API_TOKEN -F title="${CIRCLE_PROJECT_REPONAME} | branch -> ${CIRCLE_BRANCH} | commit -> ${GIT_COMMIT_DESC}" https://slack.com/api/files.upload
|
2019-02-15 09:22:55 -08:00
|
|
|
|
2019-01-24 11:22:27 -08:00
|
|
|
workflows:
|
|
|
|
version: 2
|
2019-02-15 09:22:55 -08:00
|
|
|
test_build:
|
2019-01-24 11:22:27 -08:00
|
|
|
jobs:
|
2019-02-15 09:22:55 -08:00
|
|
|
- install_deps
|
2019-02-15 09:44:35 -08:00
|
|
|
# - test:
|
|
|
|
# requires:
|
|
|
|
# - install_deps
|
2019-01-31 07:51:59 -08:00
|
|
|
- build_linux:
|
|
|
|
requires:
|
2019-02-15 09:44:35 -08:00
|
|
|
- install_deps
|