From 6062a5c7ee93a4b818061a7d11edfee48f5b385c Mon Sep 17 00:00:00 2001 From: atarpara Date: Mon, 29 Dec 2025 18:03:19 +0530 Subject: [PATCH 1/5] Check CI --- test/FixedPointMathLib.t.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/test/FixedPointMathLib.t.sol b/test/FixedPointMathLib.t.sol index edc37f066..bbabf4bc8 100644 --- a/test/FixedPointMathLib.t.sol +++ b/test/FixedPointMathLib.t.sol @@ -925,6 +925,7 @@ contract FixedPointMathLibTest is SoladyTest { assertEq(FixedPointMathLib.log2(0), 0); assertEq(FixedPointMathLib.log2(2), 1); assertEq(FixedPointMathLib.log2(4), 2); + assertEq(FixedPointMathLib.log2(10), 3); assertEq(FixedPointMathLib.log2(1024), 10); assertEq(FixedPointMathLib.log2(1048576), 20); assertEq(FixedPointMathLib.log2(1073741824), 30); From 439469bccd091b4906104c313ed7aa56171db1af Mon Sep 17 00:00:00 2001 From: atarpara Date: Mon, 29 Dec 2025 18:30:23 +0530 Subject: [PATCH 2/5] Check --- test/FixedPointMathLib.t.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/test/FixedPointMathLib.t.sol b/test/FixedPointMathLib.t.sol index bbabf4bc8..962f950df 100644 --- a/test/FixedPointMathLib.t.sol +++ b/test/FixedPointMathLib.t.sol @@ -926,6 +926,7 @@ contract FixedPointMathLibTest is SoladyTest { assertEq(FixedPointMathLib.log2(2), 1); assertEq(FixedPointMathLib.log2(4), 2); assertEq(FixedPointMathLib.log2(10), 3); + assertEq(FixedPointMathLib.log2(20), 4); assertEq(FixedPointMathLib.log2(1024), 10); assertEq(FixedPointMathLib.log2(1048576), 20); assertEq(FixedPointMathLib.log2(1073741824), 30); From e4cf9daae6bf94da1abc7ff444ecb27b431a65cc Mon Sep 17 00:00:00 2001 From: atarpara Date: Tue, 30 Dec 2025 15:50:24 +0530 Subject: [PATCH 3/5] T --- .github/workflows/ci.yml | 180 +++++++++++++++++++-------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa59b520..3eac4831d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,97 +11,97 @@ name: ci - '**.sol' - '**.yml' jobs: - tests-stable: - name: Forge Testing - runs-on: ubuntu-latest - strategy: - matrix: - profile: [post-osaka,post-osaka-via-ir,solc-past-versions-0,solc-past-versions-1,via-ir,min-solc,min-solc-via-ir,intense] - steps: - - uses: actions/checkout@v5 - - name: Install Foundry Stable - uses: foundry-rs/foundry-toolchain@v1 - with: - version: stable - - name: Install Dependencies - run: forge install - # NOTE: skipping solc 0.8.32 due to compiler bug - # https://github.com/argotorg/solidity/issues/16360 - - name: Run Tests with ${{ matrix.profile }} - run: > - ( [ "${{ matrix.profile }}" = "post-osaka" ] && - FOUNDRY_PROFILE=post_osaka forge test --use 0.8.33 && - FOUNDRY_PROFILE=zksync forge test --use 0.8.33 - ) || - ( [ "${{ matrix.profile }}" = "post-osaka-via-ir" ] && - FOUNDRY_PROFILE=post_osaka forge test --use 0.8.33 --via-ir && - FOUNDRY_PROFILE=zksync forge test --use 0.8.33 --via-ir - ) || - ( [ "${{ matrix.profile }}" = "solc-past-versions-0" ] && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.5 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.6 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.7 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.8 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.9 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.10 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.11 --fuzz-runs 16 && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.12 --fuzz-runs 16 - ) || - ( [ "${{ matrix.profile }}" = "solc-past-versions-1" ] && - forge test --use 0.8.13 --fuzz-runs 16 && - forge test --use 0.8.14 --fuzz-runs 16 && - forge test --use 0.8.15 --fuzz-runs 16 && - forge test --use 0.8.16 --fuzz-runs 16 && - forge test --use 0.8.17 --fuzz-runs 16 && - forge test --use 0.8.18 --fuzz-runs 16 && - forge test --use 0.8.19 --fuzz-runs 16 && - forge test --use 0.8.20 --fuzz-runs 16 && - forge test --use 0.8.21 --fuzz-runs 16 && - forge test --use 0.8.22 --fuzz-runs 16 && - forge test --use 0.8.23 --fuzz-runs 16 && - forge test --use 0.8.24 --fuzz-runs 16 && - forge test --use 0.8.25 --fuzz-runs 16 && - forge test --use 0.8.26 --fuzz-runs 16 && - forge test --use 0.8.27 --fuzz-runs 16 && - forge test --use 0.8.28 --fuzz-runs 16 && - forge test --use 0.8.29 --fuzz-runs 16 && - forge test --use 0.8.30 --fuzz-runs 16 && - forge test --use 0.8.31 --fuzz-runs 16 - ) || - ( [ "${{ matrix.profile }}" = "via-ir" ] && - forge test --via-ir - ) || - ( [ "${{ matrix.profile }}" = "min-solc" ] && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4 - ) || - ( [ "${{ matrix.profile }}" = "min-solc-via-ir" ] && - FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4 --via-ir - ) || - ( [ "${{ matrix.profile }}" = "intense" ] && - forge test --fuzz-runs 5000 - ) + # tests-stable: + # name: Forge Testing + # runs-on: ubuntu-latest + # strategy: + # matrix: + # profile: [post-osaka,post-osaka-via-ir,solc-past-versions-0,solc-past-versions-1,via-ir,min-solc,min-solc-via-ir,intense] + # steps: + # - uses: actions/checkout@v5 + # - name: Install Foundry Stable + # uses: foundry-rs/foundry-toolchain@v1 + # with: + # version: stable + # - name: Install Dependencies + # run: forge install + # # NOTE: skipping solc 0.8.32 due to compiler bug + # # https://github.com/argotorg/solidity/issues/16360 + # - name: Run Tests with ${{ matrix.profile }} + # run: > + # ( [ "${{ matrix.profile }}" = "post-osaka" ] && + # FOUNDRY_PROFILE=post_osaka forge test --use 0.8.33 && + # FOUNDRY_PROFILE=zksync forge test --use 0.8.33 + # ) || + # ( [ "${{ matrix.profile }}" = "post-osaka-via-ir" ] && + # FOUNDRY_PROFILE=post_osaka forge test --use 0.8.33 --via-ir && + # FOUNDRY_PROFILE=zksync forge test --use 0.8.33 --via-ir + # ) || + # ( [ "${{ matrix.profile }}" = "solc-past-versions-0" ] && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.5 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.6 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.7 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.8 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.9 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.10 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.11 --fuzz-runs 16 && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.12 --fuzz-runs 16 + # ) || + # ( [ "${{ matrix.profile }}" = "solc-past-versions-1" ] && + # forge test --use 0.8.13 --fuzz-runs 16 && + # forge test --use 0.8.14 --fuzz-runs 16 && + # forge test --use 0.8.15 --fuzz-runs 16 && + # forge test --use 0.8.16 --fuzz-runs 16 && + # forge test --use 0.8.17 --fuzz-runs 16 && + # forge test --use 0.8.18 --fuzz-runs 16 && + # forge test --use 0.8.19 --fuzz-runs 16 && + # forge test --use 0.8.20 --fuzz-runs 16 && + # forge test --use 0.8.21 --fuzz-runs 16 && + # forge test --use 0.8.22 --fuzz-runs 16 && + # forge test --use 0.8.23 --fuzz-runs 16 && + # forge test --use 0.8.24 --fuzz-runs 16 && + # forge test --use 0.8.25 --fuzz-runs 16 && + # forge test --use 0.8.26 --fuzz-runs 16 && + # forge test --use 0.8.27 --fuzz-runs 16 && + # forge test --use 0.8.28 --fuzz-runs 16 && + # forge test --use 0.8.29 --fuzz-runs 16 && + # forge test --use 0.8.30 --fuzz-runs 16 && + # forge test --use 0.8.31 --fuzz-runs 16 + # ) || + # ( [ "${{ matrix.profile }}" = "via-ir" ] && + # forge test --via-ir + # ) || + # ( [ "${{ matrix.profile }}" = "min-solc" ] && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4 + # ) || + # ( [ "${{ matrix.profile }}" = "min-solc-via-ir" ] && + # FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4 --via-ir + # ) || + # ( [ "${{ matrix.profile }}" = "intense" ] && + # forge test --fuzz-runs 5000 + # ) - tests-ithaca: - name: Forge Ithaca Testing - runs-on: ubuntu-latest - strategy: - matrix: - profile: [post-cancun,post-cancun-via-ir] - steps: - - uses: actions/checkout@v5 - - name: Install Foundry Stable - uses: foundry-rs/foundry-toolchain@v1 - with: - version: stable - - name: Install Dependencies - run: forge install - - name: Run Tests with ${{ matrix.profile }} - run: | - if [[ "${{ matrix.profile }}" == "post-cancun" ]]; then - FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 - elif [[ "${{ matrix.profile }}" == "post-cancun-via-ir" ]]; then - FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 --via-ir - fi + # tests-ithaca: + # name: Forge Ithaca Testing + # runs-on: ubuntu-latest + # strategy: + # matrix: + # profile: [post-cancun,post-cancun-via-ir] + # steps: + # - uses: actions/checkout@v5 + # - name: Install Foundry Stable + # uses: foundry-rs/foundry-toolchain@v1 + # with: + # version: stable + # - name: Install Dependencies + # run: forge install + # - name: Run Tests with ${{ matrix.profile }} + # run: | + # if [[ "${{ matrix.profile }}" == "post-cancun" ]]; then + # FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 + # elif [[ "${{ matrix.profile }}" == "post-cancun-via-ir" ]]; then + # FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 --via-ir + # fi codespell: runs-on: ${{ matrix.os }} From 5facc1a6c122f72604cd2e02eaa2006c356b5136 Mon Sep 17 00:00:00 2001 From: atarpara Date: Tue, 30 Dec 2025 15:52:41 +0530 Subject: [PATCH 4/5] T --- test/FixedPointMathLib.t.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/test/FixedPointMathLib.t.sol b/test/FixedPointMathLib.t.sol index 962f950df..6d2e85e4e 100644 --- a/test/FixedPointMathLib.t.sol +++ b/test/FixedPointMathLib.t.sol @@ -927,6 +927,7 @@ contract FixedPointMathLibTest is SoladyTest { assertEq(FixedPointMathLib.log2(4), 2); assertEq(FixedPointMathLib.log2(10), 3); assertEq(FixedPointMathLib.log2(20), 4); + assertEq(FixedPointMathLib.log2(30), 4); assertEq(FixedPointMathLib.log2(1024), 10); assertEq(FixedPointMathLib.log2(1048576), 20); assertEq(FixedPointMathLib.log2(1073741824), 30); From 4ae87d4fc44682e080dec34830cabf697a735f90 Mon Sep 17 00:00:00 2001 From: atarpara Date: Tue, 30 Dec 2025 16:02:22 +0530 Subject: [PATCH 5/5] Fix CI --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++- .github/workflows/gas-diff-comment.yml | 42 -------------------------- 2 files changed, 38 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/gas-diff-comment.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3eac4831d..fe3864b36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,11 @@ jobs: gas-diff: if: github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v5 @@ -146,6 +150,39 @@ jobs: with: name: gas-diff path: gas-diff/ + + post-gas-diff-comment: + if: github.event_name == 'pull_request' + needs: gas-diff + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + permissions: + pull-requests: write + actions: read + steps: + - name: Download gas diff artifact + uses: dawidd6/action-download-artifact@v12 + with: + name: gas-diff + run_id: ${{ github.run_id }} + + - name: Read gas diff + id: gas_diff + run: | + if [ -f comment.md ]; then + echo "markdown<> $GITHUB_OUTPUT + cat comment.md >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + fi + + - name: Add gas diff to sticky comment + if: steps.gas_diff.outputs.markdown + uses: marocchino/sticky-pull-request-comment@v2 + with: + message: ${{ steps.gas_diff.outputs.markdown }} prep-checker: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/gas-diff-comment.yml b/.github/workflows/gas-diff-comment.yml deleted file mode 100644 index c17bd7726..000000000 --- a/.github/workflows/gas-diff-comment.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Post Gas Diff Comment - -on: - workflow_run: - workflows: ["ci"] - types: - - completed - -jobs: - comment: - if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' - runs-on: ubuntu-latest - permissions: - pull-requests: write - actions: read - steps: - - name: Download gas diff artifact - uses: dawidd6/action-download-artifact@v6 - with: - name: gas-diff - workflow: ci.yml - run_id: ${{ github.event.workflow_run.id }} - - - name: Read PR number - id: pr - run: echo "number=$(cat pr-number.txt)" >> $GITHUB_OUTPUT - - - name: Read gas diff - id: gas_diff - run: | - if [ -f comment.md ]; then - echo "markdown<> $GITHUB_OUTPUT - cat comment.md >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - fi - - - name: Add gas diff to sticky comment - if: steps.gas_diff.outputs.markdown - uses: marocchino/sticky-pull-request-comment@v2 - with: - number: ${{ steps.pr.outputs.number }} - message: ${{ steps.gas_diff.outputs.markdown }} \ No newline at end of file