diff --git a/.github/workflows/ci-storage-check-aave-v2.yml b/.github/workflows/ci-storage-check-aave-v2.yml new file mode 100644 index 000000000..c85dc37c2 --- /dev/null +++ b/.github/workflows/ci-storage-check-aave-v2.yml @@ -0,0 +1,50 @@ +name: Storage layout checks + +on: + push: + branches: + - main + - dev + pull_request: + paths: + - lib/** + - contracts/common/** + - contracts/aave-v2/** + - "*.lock" + - remappings.txt + - .github/actions/ci-storage-layout/* + - .github/workflows/ci-storage-layout-aave-v2.yml + +jobs: + morpho-aave-v2: + name: morpho-aave-v2 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile + shell: bash + + - name: Install Foundry + uses: onbjerg/foundry-toolchain@v1 + with: + version: nightly + + - name: Check Morpho storage layout + uses: Rubilmax/foundry-storage-check@v2 + with: + contract: contracts/aave-v2/Morpho.sol:Morpho + + - name: Check RewardsManager storage layout + uses: Rubilmax/foundry-storage-check@v2 + with: + contract: contracts/aave-v2/RewardsManager.sol:RewardsManager + diff --git a/.github/workflows/ci-storage-check-compound.yml b/.github/workflows/ci-storage-check-compound.yml new file mode 100644 index 000000000..7c8490078 --- /dev/null +++ b/.github/workflows/ci-storage-check-compound.yml @@ -0,0 +1,50 @@ +name: Storage layout checks + +on: + push: + branches: + - main + - dev + pull_request: + paths: + - lib/** + - contracts/common/** + - contracts/compound/** + - "*.lock" + - remappings.txt + - .github/actions/ci-storage-layout/* + - .github/workflows/ci-storage-layout-compound.yml + +jobs: + morpho-compound: + name: morpho-compound + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile + shell: bash + + - name: Install Foundry + uses: onbjerg/foundry-toolchain@v1 + with: + version: nightly + + - name: Check Morpho storage layout + uses: Rubilmax/foundry-storage-check@v2 + with: + contract: contracts/compound/Morpho.sol:Morpho + + - name: Check RewardsManager storage layout + uses: Rubilmax/foundry-storage-check@v2 + with: + contract: contracts/compound/RewardsManager.sol:RewardsManager + diff --git a/.github/workflows/ci-storage-layout-aave-v2.yml b/.github/workflows/ci-storage-snapshot-check-aave-v2.yml similarity index 89% rename from .github/workflows/ci-storage-layout-aave-v2.yml rename to .github/workflows/ci-storage-snapshot-check-aave-v2.yml index 055e40d43..01def897b 100644 --- a/.github/workflows/ci-storage-layout-aave-v2.yml +++ b/.github/workflows/ci-storage-snapshot-check-aave-v2.yml @@ -1,4 +1,4 @@ -name: Storage layout check (Morpho-Compound) +name: Storage layout snapshot check (Morpho-Compound) on: push: @@ -9,7 +9,7 @@ on: jobs: check: - name: storage layout check + name: Storage layout snapshot check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ci-storage-layout-compound.yml b/.github/workflows/ci-storage-snapshot-check-compound.yml similarity index 90% rename from .github/workflows/ci-storage-layout-compound.yml rename to .github/workflows/ci-storage-snapshot-check-compound.yml index 51b435626..a3fb15895 100644 --- a/.github/workflows/ci-storage-layout-compound.yml +++ b/.github/workflows/ci-storage-snapshot-check-compound.yml @@ -1,4 +1,4 @@ -name: Storage layout check (Morpho-Compound) +name: Storage layout snapshot check (Morpho-Compound) on: push: @@ -9,7 +9,7 @@ on: jobs: check: - name: storage layout check + name: Storage layout snapshot check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/scripts/storage-layout.sh b/scripts/storage-layout.sh index ea55ee815..9ccf908f0 100755 --- a/scripts/storage-layout.sh +++ b/scripts/storage-layout.sh @@ -47,4 +47,4 @@ elif [[ $func == "generate" ]]; then else echo "Unknown command. Use 'generate' or 'check' as the first argument." exit 1 -fi \ No newline at end of file +fi