From 2597042daf22891d5b415916f582a2ff33b08cb3 Mon Sep 17 00:00:00 2001 From: nikolay19 Date: Tue, 20 Feb 2024 12:25:27 +0300 Subject: [PATCH] old version workflow --- .github/workflows/benchmark_old.yml | 117 ---------------------------- .github/workflows/old_version.yml | 5 +- slitherin-benchmark | 2 +- 3 files changed, 5 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/benchmark_old.yml diff --git a/.github/workflows/benchmark_old.yml b/.github/workflows/benchmark_old.yml deleted file mode 100644 index 789d291..0000000 --- a/.github/workflows/benchmark_old.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Run Benchmark - -on: - workflow_dispatch: # Ручной запуск через UI Гитхаба -jobs: - RunBenchmarkOld: - runs-on: ubuntu-latest - env: - slitherin_version: 0.1.0 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: 'true' - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: '18.x' - - name: Update pip - run: python -m pip install --upgrade pip - - name: Install solc-select - run: python -m pip install solc-select - - name: Install Slither - run: python -m pip install slither-analyzer - - name: Install Setuptools - run: python -m pip install setuptools - - name: Install Slitherin - run: python -m pip install slitherin==$slitherin_version - - name: Configure - run: | - cd slitherin-benchmark/ - mv example.config.py config.py - - name: Install benchmark requirements - run: | - cd slitherin-benchmark/ - python -m pip install -r requirements.txt - - name: Run Benchmark - run: | - cd slitherin-benchmark/ - python runner.py -i contracts/mainnet -o mainnet.csv --limit 8000 --skip-duplicates --skip-libs --use-slither - - name: Upload sheet - run: | - cd slitherin-benchmark/ - echo $GOOGLE_JWT > service_account.json - python save_sheet.py -i mainnet.csv -sa service_account.json -si $GOOGLE_SHEET_ID -ln mainnet -sv "slitherin $slitherin_version" - env: - GOOGLE_JWT : ${{secrets.SERVICE_ACCOUNT}} - GOOGLE_SHEET_ID : ${{ secrets.GOOGLE_SHEET_ID }} - - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 - with: - name: mainnet - path: slitherin-benchmark/mainnet.csv - RunBenchmarkOZOld: - runs-on: ubuntu-latest - env: - slitherin_version: 0.1.0 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: 'true' - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: '18.x' - - name: Update pip - run: python -m pip install --upgrade pip - - name: Install solc-select - run: python -m pip install solc-select - - name: Install Slither - run: python -m pip install slither-analyzer - - name: Install Setuptools - run: python -m pip install setuptools - - name: Install Slitherin - run: python -m pip install slitherin==$slitherin_version - - name: Configure - run: | - cd slitherin-benchmark/ - mv example.config.py config.py - - name: Install node dependencies - run: npm ci - - name: Install benchmark requirements - run: | - cd slitherin-benchmark/ - python -m pip install -r requirements.txt - - name: Run Benchmark - run: | - cd slitherin-benchmark/ - python runner.py -i contracts/openzeppelin -o oz.csv -eo oz_extra.csv --use-slither - - name: Upload sheet - run: | - cd slitherin-benchmark/ - echo $GOOGLE_JWT > service_account.json - ls - python save_sheet.py -i oz.csv -sa service_account.json -si $GOOGLE_SHEET_ID -ln OZ -sv "slitherin $slitherin_version" - env: - GOOGLE_JWT : ${{secrets.SERVICE_ACCOUNT}} - GOOGLE_SHEET_ID : ${{ secrets.GOOGLE_SHEET_ID }} - - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 - with: - name: oz - path: slitherin-benchmark/oz.csv - - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 - with: - name: oz_extra - path: slitherin-benchmark/oz_extra.csv diff --git a/.github/workflows/old_version.yml b/.github/workflows/old_version.yml index 758dbc8..6669997 100644 --- a/.github/workflows/old_version.yml +++ b/.github/workflows/old_version.yml @@ -1,7 +1,9 @@ name: Run Benchmark on: - workflow_dispatch: # Ручной запуск через UI Гитхаба + pull_request: + branches: + - 'benchmark_run' jobs: RunBenchmarkOld: runs-on: ubuntu-latest @@ -116,3 +118,4 @@ jobs: name: oz_extra path: slitherin-benchmark/oz_extra.csv + diff --git a/slitherin-benchmark b/slitherin-benchmark index 12792f9..96f43d6 160000 --- a/slitherin-benchmark +++ b/slitherin-benchmark @@ -1 +1 @@ -Subproject commit 12792f91792dfe5a90ed9a0fc955606082b92305 +Subproject commit 96f43d6b35076a2b2912d9dfbc9695de0c8dfede