Skip to content

Commit

Permalink
Add back contract size and storage layout check
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Nov 22, 2023
1 parent 128b05c commit 0cc55c8
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 3 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
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ jobs:
with:
package_folder: ${{ inputs.package_folder }}

- name: Build contracts
run: |
cd ${{ inputs.package_folder}} && forge build
- name: Check contract sizes
run: cd ${{ inputs.package_folder }} && yarn build:sizes
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 check
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
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: Inpect storage layout
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 0cc55c8

Please sign in to comment.