Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing yarn workspaces 🚀 #900

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fe05233
Implementing yarn workspaces 🚀
evertonfraga Sep 29, 2020
5ed5170
Changing cache keys
evertonfraga Oct 5, 2020
5a117eb
Removing -- as theyre unnecessary for Yarn
evertonfraga Oct 5, 2020
8554d86
Replacing npm by yarn on CI files
evertonfraga Oct 5, 2020
081c367
Replacing npm by yarn on README
evertonfraga Oct 5, 2020
33bb014
Fresh yarn lock
evertonfraga Oct 5, 2020
33dd5ab
Replacing Lerna hoist by Yarn workspaces
evertonfraga Oct 5, 2020
0dbd8fa
Bumping ethereumjs-util to have the new Address type
evertonfraga Oct 5, 2020
0e3dad9
Lerna bootstrap with yarn
evertonfraga Oct 6, 2020
7aebafa
account: removing package
evertonfraga Oct 27, 2020
6e80522
docs: update from npm to yarn
evertonfraga Oct 29, 2020
8c97ddd
Updating CI installation commands
evertonfraga Oct 29, 2020
e774d5e
Lockfiles
evertonfraga Oct 29, 2020
d3d98e4
Package order
evertonfraga Oct 29, 2020
b8e4a77
Loading ethereum/tests dependency submodule in a postinstall script
evertonfraga Oct 29, 2020
48752bb
ci: unifying build cache keys (A/B testing for lockfile path)
evertonfraga Oct 29, 2020
c7f37d0
tooling: Shellcheck fixes
evertonfraga Oct 29, 2020
436e5d5
ci: fixing lockfiles path
evertonfraga Oct 29, 2020
7577125
Remove cache condition for yarn execution (A/B testing)
evertonfraga Oct 29, 2020
9dcea78
Remove cache condition for yarn execution
evertonfraga Oct 29, 2020
450b985
ci: updating yarn run clean and CI files
evertonfraga Oct 29, 2020
83da508
docs: Updating yarn instruction
evertonfraga Oct 30, 2020
115c8d3
Removing double-dash from yarn commands
evertonfraga Oct 30, 2020
83bff39
tests: Removing submodule load shim script
evertonfraga Nov 14, 2020
ff12905
lockfile grooming
evertonfraga Nov 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: Block-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:block
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:block
- run: yarn run build:block
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: block
if: ${{ matrix.node-version == 12 }}

- run: npm run lint
- run: yarn run lint
13 changes: 5 additions & 8 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: Blockchain-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:blockchain
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:blockchain
- run: yarn run build:blockchain
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: blockchain
if: ${{ matrix.node-version == 12 }}

- run: npm run lint
- run: yarn run lint
13 changes: 5 additions & 8 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: Common-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:common
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:common
- run: yarn run build:common
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: common
if: ${{ matrix.node-version == 12 }}

- run: npm run lint
- run: yarn run lint
13 changes: 5 additions & 8 deletions .github/workflows/ethash-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: Ethash-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:ethash
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:ethash
- run: yarn run build:ethash
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: ethash
if: ${{ matrix.node-version == 12 }}

- run: npm run lint
- run: yarn run lint
13 changes: 5 additions & 8 deletions .github/workflows/tx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,22 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: Tx-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:tx
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:tx
- run: yarn run build:tx
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: tx
if: ${{ matrix.node-version == 12 }}

- run: npm run lint
- run: yarn run lint
54 changes: 21 additions & 33 deletions .github/workflows/vm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,26 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: VM-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:vm
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:vm
- run: yarn run build:vm
working-directory: ${{github.workspace}}

- run: npm run coverage
- run: yarn run coverage

- uses: codecov/codecov-action@v1
with:
file: ${{ env.cwd }}/coverage/lcov.info
flags: vm

- run: npm run test:API
- run: npm run test:API:browser
- run: npm run lint
- run: yarn run test:API
- run: yarn run test:API:browser
- run: yarn run lint

test-vm-state:
runs-on: ubuntu-latest
Expand All @@ -66,20 +63,17 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: VM-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:vm
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:vm
- run: yarn run build:vm
working-directory: ${{github.workspace}}

- run: npm run test:state:selectedForks
- run: yarn run test:state:selectedForks

test-vm-blockchain:
runs-on: ubuntu-latest
Expand All @@ -95,20 +89,17 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: VM-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:vm
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:vm
- run: yarn run build:vm
working-directory: ${{github.workspace}}

- run: npm run test:blockchain
- run: yarn run test:blockchain

vm-benchmarks:
runs-on: ubuntu-latest
Expand All @@ -124,26 +115,23 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: VM-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

# Installs root dependencies, ignoring Bootstrap All script.
# Bootstraps the current package only
- run: npm install --ignore-scripts && npm run bootstrap:vm
if: steps.cache.outputs.cache-hit != 'true'
- run: yarn
working-directory: ${{github.workspace}}

# Builds current package and the ones it depends from.
- run: npm run build:vm
- run: yarn run build:vm
working-directory: ${{github.workspace}}

- run: npm run build:benchmarks
- run: yarn run build:benchmarks
working-directory: ${{ env.cwd }}

- run: npm run benchmarks -- 10 | tee output.txt
- run: yarn run benchmarks -- 10 | tee output.txt
working-directory: ${{ env.cwd }}

# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing lock files
- run: git stash

- name: Compare benchmarks
Expand Down
48 changes: 22 additions & 26 deletions .github/workflows/vm-nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@ jobs:
submodules: recursive

# This is specific to Nightly test 1/2.
# The job needs to run with a fresh combination of lockfiles, to warm up the cache.
# So in this step, we remove the lockfiles
- run: rm package-lock.json packages/*/package-lock.json
# The job needs to run with a fresh lockfile.
- run: rm yarn.lock
working-directory: ${{github.workspace}}

# This is specific to Nightly test 2/2.
# Here, we generate new lockfiles
- run: npm install
- run: yarn
working-directory: ${{github.workspace}}

- run: npm run build
- run: yarn run build
working-directory: ${{github.workspace}}

- run: npm run test:API
- run: npm run test:API:browser
- run: yarn run test:API
- run: yarn run test:API:browser

test-vm-state:
runs-on: ubuntu-latest
Expand All @@ -49,20 +48,19 @@ jobs:
submodules: recursive

# This is specific to Nightly test 1/2.
# The job needs to run with a fresh combination of lockfiles, to warm up the cache.
# So in this step, we remove the lockfiles
- run: rm package-lock.json packages/*/package-lock.json
# The job needs to run with a fresh lockfile.
- run: rm yarn.lock
working-directory: ${{github.workspace}}

# This is specific to Nightly test 2/2.
# Here, we generate new lockfiles
- run: npm install
- run: yarn
working-directory: ${{github.workspace}}

- run: npm run build
- run: yarn run build
working-directory: ${{github.workspace}}

- run: npm run test:state:allForks
- run: yarn run test:state:allForks

test-vm-blockchain:
runs-on: ubuntu-latest
Expand All @@ -75,14 +73,13 @@ jobs:
submodules: recursive

# This is specific to Nightly test 1/2.
# The job needs to run with a fresh combination of lockfiles, to warm up the cache.
# So in this step, we remove the lockfiles
- run: rm package-lock.json packages/*/package-lock.json
# The job needs to run with a fresh lockfile.
- run: rm yarn.lock
working-directory: ${{github.workspace}}

# This is specific to Nightly test 2/2.
# Here, we generate new lockfiles
- run: npm install
- run: yarn
working-directory: ${{github.workspace}}

# This is specific to Nightly test 3/2.
Expand All @@ -92,13 +89,13 @@ jobs:
uses: actions/cache@v2
id: cache
with:
key: VM-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
key: cache-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'

- run: npm run build
- run: yarn run build
working-directory: ${{github.workspace}}

- run: npm run test:blockchain:allForks
- run: yarn run test:blockchain:allForks
working-directory: '${{ env.cwd }}'

test-vm-slow:
Expand All @@ -112,17 +109,16 @@ jobs:
submodules: recursive

# This is specific to Nightly test 1/2.
# The job needs to run with a fresh combination of lockfiles, to warm up the cache.
# So in this step, we remove the lockfiles
- run: rm package-lock.json packages/*/package-lock.json
# The job needs to run with a fresh lockfile.
- run: rm yarn.lock
working-directory: ${{github.workspace}}

# This is specific to Nightly test 2/2.
# Here, we generate new lockfiles
- run: npm install
- run: yarn
working-directory: ${{github.workspace}}

- run: npm run build
- run: yarn run build
working-directory: ${{github.workspace}}

- run: npm run test:state:slow
- run: yarn run test:state:slow
Loading