Skip to content

Commit

Permalink
perf: improve contracts build time (#24)
Browse files Browse the repository at this point in the history
* perf: improve contracts build time

* chore: clean tsconfig.buildinfo

* ci: try running CI
  • Loading branch information
gakonst authored Mar 31, 2021
1 parent 86f5ace commit 5f2e00a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ts-packages.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: optimism - lint, test
name: typescript / contracts

on:
push:
branches:
- master
paths:
- 'packages/**'
- 'packages/**/*.sol'
- 'packages/**/*.ts'
pull_request:
branches:
- master
paths:
- 'packages/**'
- 'packages/**/*.sol'
- 'packages/**/*.ts'

jobs:
build-test-lint:
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "MIT",
"scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "yarn run build:contracts && yarn run build:contracts:ovm && yarn run build:typescript && yarn run build:copy && yarn run build:dump && yarn run build:typechain",
"build": "./scripts/build.sh",
"build:kovan": "yarn run build:contracts && yarn run build:typescript && yarn run build:copy && CHAIN_ID=69 yarn run build:dump && yarn run build:typechain",
"build:mainnet": "yarn run build:contracts && yarn run build:typescript && yarn run build:copy && CHAIN_ID=10 yarn run build:dump && yarn run build:typechain",
"build:typescript": "tsc -p ./tsconfig.build.json",
Expand All @@ -28,7 +28,7 @@
"lint:typescript": "tslint --format stylish --project .",
"lint:fix": "yarn run lint:fix:typescript",
"lint:fix:typescript": "prettier --config prettier-config.json --write \"hardhat.config.ts\" \"{src,test}/**/*.ts\"",
"clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm",
"clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm ./tsconfig.build.tsbuildinfo",
"deploy": "./bin/deploy.js",
"serve": "./bin/serve_dump.sh"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/contracts/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
yarn run build:typescript &
yarn run build:contracts:ovm &
yarn run build:contracts &

wait

yarn run build:copy:artifacts &
yarn run build:copy:artifacts:ovm &
yarn run build:copy:contracts &
wait

0 comments on commit 5f2e00a

Please sign in to comment.