Skip to content

Commit

Permalink
Add back contract size and storage layout check to CI (#388)
Browse files Browse the repository at this point in the history
* Add back contract size and storage layout check

* undo changes to build jobs

* fix build task name
  • Loading branch information
oveddan authored and kulkarohan committed Dec 8, 2023
1 parent 7d9d0d7 commit 59b212b
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/1155.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ jobs:
with:
package_folder: packages/1155-contracts

storage_layout:
needs: build
uses: ./.github/workflows/storage_layout.yml
with:
package_folder: packages/1155-contracts

contract_sizes:
needs: build
uses: ./.github/workflows/contract_sizes.yml
with:
package_folder: packages/1155-contracts

coverage:
uses: ./.github/workflows/coverage.yml
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/contract_sizes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_call:
inputs:
package_folder:
required: true
type: string

jobs:
check:
strategy:
fail-fast: true

name: Contract sizes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install node deps and founry
uses: ./.github/actions/setup_deps

- name: Cache build
uses: ./.github/actions/cache_foundry_build
with:
package_folder: ${{ inputs.package_folder }}

- name: Check contract sizes
run: cd ${{ inputs.package_folder }} && yarn build:sizes
6 changes: 6 additions & 0 deletions .github/workflows/protocol-rewards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
with:
package_folder: packages/protocol-rewards

contract_sizes:
needs: build
uses: ./.github/workflows/contract_sizes.yml
with:
package_folder: packages/protocol-rewards

coverage:
uses: ./.github/workflows/coverage.yml
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/storage_layout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_call:
inputs:
package_folder:
required: true
type: string

jobs:
check:
strategy:
fail-fast: true

name: Storage layout inspection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install node deps and founry
uses: ./.github/actions/setup_deps

- name: Cache build
uses: ./.github/actions/cache_foundry_build
with:
package_folder: ${{ inputs.package_folder }}

- name: "Inspect Storage Layout"
run: cd ${{ inputs.package_folder}} && yarn storage-inspect:check

0 comments on commit 59b212b

Please sign in to comment.