Skip to content

Commit

Permalink
Simplify build process
Browse files Browse the repository at this point in the history
  • Loading branch information
comountainclimber committed Aug 15, 2022
1 parent 34fa17f commit b539113
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 69 deletions.
88 changes: 20 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,50 @@
version: 2.1

orbs:
win: circleci/[email protected]

references:
container_config: &container_config
docker:
- image: electronuserland/builder:wine-chrome-05.21
environment:
TARGET_ARCH: x64
working_directory: ~/neon-wallet

workspace_root: &workspace_root ~/neon-wallet

attach_workspace: &attach_workspace
attach_workspace:
at: *workspace_root
node: circleci/[email protected]

jobs:
test:
<<: *container_config
macos:
xcode: "14.0.0"
steps:
- node/install:
node-version: "16.14.2"
- checkout
- restore_cache:
key: neon-wallet-dependencies-cache-{{ checksum "yarn.lock" }}
- run: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- run: apt-get -y update
- run: yarn config delete proxy
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn lint
- run: yarn flow
- run: yarn assets
- run: yarn test-ci
- save_cache:
key: neon-wallet-dependencies-cache-{{ checksum "yarn.lock" }}
key: neon-wallet-dependencies-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
- /usr/local/share/.cache/yarn/v2
- ./node_modules

build_linux:
<<: *container_config
resource_class: large
steps:
- checkout
- restore_cache:
key: neon-wallet-dependencies-cache-{{ checksum "yarn.lock" }}
- run: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- run: apt-get -y update
- run: apt-get -y install libusb-1.0-0-dev icnsutils graphicsmagick libudev-dev
- run: apt-get -y install libxtst6 libxss1 libgtk2.0-0 libnss3 libasound2 libgconf-2-4
- run: yarn config delete proxy
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn release
- store_artifacts:
path: dist
destination: build

build_macos:
build:
macos:
xcode: "14.0.0"
steps:
- node/install:
node-version: "16.14.2"
- checkout
- restore_cache:
key: neon-wallet-dependencies-cache-{{ checksum "yarn.lock" }}
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn release
- run: yarn release:all
- save_cache:
key: neon-wallet-dependencies-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
- /usr/local/share/.cache/yarn/v2
- ./node_modules
- store_artifacts:
path: dist
destination: build

build_win:
executor:
name: win/default
size: "medium"
steps:
- checkout
- run: npm install --global --production windows-build-tools --vs2015
- run: npm config set msvs_version 2015 -g
- run: choco install windows-sdk-8.1
- run: yarn install --ignore-engines --frozen-lockfile --network-timeout 1000000 --network-concurrency 1
- run: yarn release
- store_artifacts:
path: dist
destination: build

workflows:
version: 2
Expand All @@ -91,19 +55,7 @@ workflows:
deploy:
jobs:
# build artifacts only on tags with name v.*
- build_macos:
filters:
branches:
ignore: /.*/
tags:
only: /v.*/
- build_win:
filters:
branches:
ignore: /.*/
tags:
only: /v.*/
- build_linux:
- build:
filters:
branches:
ignore: /.*/
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Neon",
"version": "2.13.3",
"version": "2.13.4",
"main": "./main.js",
"description": "Light wallet for NEO blockchain",
"homepage": "https://github.com/CityOfZion/neon-wallet",
Expand All @@ -18,6 +18,7 @@
"test-watch": "jest --watch",
"pack": "build --dir",
"release": "yarn assets && dotenv yarn electron-builder --publish",
"release:all": "yarn assets && dotenv yarn electron-builder -- --publish always --win --mac --linux",
"dist": "yarn assets && dotenv yarn electron-builder",
"lint": "eslint -c .eslintrc ./app --ext .js,.jsx --ignore-pattern dist/",
"lint-fix": "eslint -c .eslintrc ./app --ext .js,.jsx --fix --ignore-pattern dist/",
Expand Down

0 comments on commit b539113

Please sign in to comment.