diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78b14fb58..8fa59b520 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,12 +121,7 @@ jobs: gas-diff: if: github.event_name == 'pull_request' - permissions: write-all - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v5 @@ -152,7 +147,6 @@ jobs: name: gas-diff path: gas-diff/ - prep-checker: runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/gas-diff-comment.yml b/.github/workflows/gas-diff-comment.yml index 98bd25074..c17bd7726 100644 --- a/.github/workflows/gas-diff-comment.yml +++ b/.github/workflows/gas-diff-comment.yml @@ -12,16 +12,19 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write + actions: read steps: - name: Download gas diff artifact - uses: actions/download-artifact@v4 + uses: dawidd6/action-download-artifact@v6 with: name: gas-diff - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} + 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: | @@ -30,9 +33,10 @@ jobs: 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 }} - delete: ${{ !steps.gas_diff.outputs.markdown }} message: ${{ steps.gas_diff.outputs.markdown }} \ No newline at end of file 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);