diff --git a/.github/workflows/asertoor.yaml b/.github/workflows/asertoor.yaml index 0c249535e4..eab0ddf6bb 100644 --- a/.github/workflows/asertoor.yaml +++ b/.github/workflows/asertoor.yaml @@ -1,14 +1,8 @@ name: Assertoor on: - pull_request: - branches: ["**"] - paths-ignore: - - "README.md" - - "LICENSE" - - "**/README.md" - - "**/docs/**" - - "crates/vm/levm/**" - - "crates/l2/**" + workflow_run: + workflows: [Docker build] + types: [completed] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -18,13 +12,10 @@ env: RUST_VERSION: 1.80.1 jobs: - build: - uses: ./.github/workflows/docker_build.yaml - run-assertoor: name: Stability Check runs-on: ubuntu-latest - needs: [build] + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v4 @@ -33,6 +24,8 @@ jobs: with: name: ethrex_image path: /tmp + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} - name: Load image run: | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12c78bb976..36ca380b70 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,14 +1,16 @@ name: CI on: + push: + branches: ["main"] merge_group: pull_request: branches: ["**"] - paths-ignore: - - "README.md" - - "LICENSE" - - "**/README.md" - - "**/docs/**" - - "crates/vm/levm/**" # We run this in a separate workflow + # paths-ignore: + # - "README.md" + # - "LICENSE" + # - "**/README.md" + # - "**/docs/**" + # - "crates/vm/levm/**" # We run this in a separate workflow concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/ci_l2.yaml b/.github/workflows/ci_l2.yaml index cf64874d6e..6ae95417c5 100644 --- a/.github/workflows/ci_l2.yaml +++ b/.github/workflows/ci_l2.yaml @@ -1,5 +1,7 @@ name: CI (L2) on: + push: + branches: ["main"] merge_group: pull_request: branches: ["**"] diff --git a/.github/workflows/ci_levm.yaml b/.github/workflows/ci_levm.yaml index e7ac06aa70..8f22d994b7 100644 --- a/.github/workflows/ci_levm.yaml +++ b/.github/workflows/ci_levm.yaml @@ -1,9 +1,9 @@ name: CI LEVM on: + push: + branches: ["main"] merge_group: - paths: - - "crates/vm/levm/**" pull_request: branches: ["**"] paths: diff --git a/.github/workflows/docker_build.yaml b/.github/workflows/docker_build.yaml index e4a70b4a8b..666028278a 100644 --- a/.github/workflows/docker_build.yaml +++ b/.github/workflows/docker_build.yaml @@ -1,8 +1,17 @@ name: Docker build +# This workflow is later used in assertoor and hive workflows on: - workflow_call: + push: + branches: ["main"] merge_group: + pull_request: + branches: ["**"] + # paths-ignore: + # - "README.md" + # - "LICENSE" + # - "**/README.md" + # - "**/docs/**" jobs: docker_build: diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index 43dbdd0a84..ef87d01363 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -2,7 +2,7 @@ name: Publish docker image to Github Packages on: push: - branches: ['main'] + branches: ["main"] env: REGISTRY: ghcr.io @@ -44,13 +44,13 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true - diff --git a/.github/workflows/hive.yaml b/.github/workflows/hive.yaml index 806ecb6791..f7dfd6db73 100644 --- a/.github/workflows/hive.yaml +++ b/.github/workflows/hive.yaml @@ -1,14 +1,8 @@ name: Hive on: - pull_request: - branches: ["**"] - paths-ignore: - - "README.md" - - "LICENSE" - - "**/README.md" - - "**/docs/**" - - "crates/vm/levm/**" - - "crates/l2/**" + workflow_run: + workflows: [Docker build] + types: [completed] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -18,13 +12,10 @@ env: RUST_VERSION: 1.80.1 jobs: - build: - uses: ./.github/workflows/docker_build.yaml - run-hive: name: ${{ matrix.name }} - needs: [build] runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} strategy: matrix: include: @@ -55,6 +46,8 @@ jobs: with: name: ethrex_image path: /tmp + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} - name: Load image run: | diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index 279dd9a018..0e92d85d65 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -10,24 +10,14 @@ env: RUST_VERSION: 1.80.1 jobs: - build: - uses: ./.github/workflows/docker_build.yaml - hive-coverage: - name: Run engine hive simulator to gather coverage information. + name: Daily Hive Coverage runs-on: ubuntu-latest - needs: [build] steps: - # TODO: Maybe this can be reused as well. - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ethrex_image - path: /tmp - - - name: Load image + - name: Pull image run: | - docker load --input /tmp/ethrex_image.tar + docker pull ghcr.io/lambdaclass/ethrex:latest + docker tag ghcr.io/lambdaclass/ethrex:latest ethrex:latest - name: Checkout sources uses: actions/checkout@v3 diff --git a/.github/workflows/l2_contracts.yaml b/.github/workflows/l2_contracts.yaml index f51b51558a..6baa158944 100644 --- a/.github/workflows/l2_contracts.yaml +++ b/.github/workflows/l2_contracts.yaml @@ -1,8 +1,8 @@ name: L2 Contracts CI on: + push: + branches: ["main"] merge_group: - paths: - - "crates/l2/contracts/**" pull_request: branches: ["**"] paths: diff --git a/.github/workflows/l2_prover_ci.yaml b/.github/workflows/l2_prover_ci.yaml index 8db8dc50a7..c0a1e8d456 100644 --- a/.github/workflows/l2_prover_ci.yaml +++ b/.github/workflows/l2_prover_ci.yaml @@ -1,5 +1,7 @@ name: L2 Prover CI on: + push: + branches: ["main"] merge_group: pull_request: branches: ["**"] diff --git a/.github/workflows/lint_pr_title.yml b/.github/workflows/lint_pr_title.yml index 03232e78f6..29e9668cff 100644 --- a/.github/workflows/lint_pr_title.yml +++ b/.github/workflows/lint_pr_title.yml @@ -5,7 +5,6 @@ on: types: - opened - edited - - synchronize jobs: main: