Skip to content

Commit

Permalink
Merge branch 'main' into fix/reset-bm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabaie authored Oct 17, 2024
2 parents 716e02b + f53e2d1 commit 5b36c0f
Show file tree
Hide file tree
Showing 341 changed files with 10,969 additions and 33,084 deletions.
39 changes: 18 additions & 21 deletions .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ on:
branches:
- main
paths:
- 'operations/**'
- 'operations/'
- '.github/workflows/all-tools.yml'
pull_request:
branches:
- main
paths:
- 'operations/**'

env:
DOCKER_IMAGE_NAME: consensys/linea-alltools
- 'operations/'
- '.github/workflows/all-tools.yml'

jobs:
changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Filter commit changes
outputs:
all-tools: ${{ steps.filter.outputs.all-tools }}
all-tools: ${{ steps.filter.outputs['all-tools'] }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -40,10 +39,10 @@ jobs:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

check_image_tags_exist:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Check image tags exist
needs: [ changes, store_image_name_and_tags ]
if: ${{ needs.changes.outputs.all-tools == 'false' }}
if: ${{ needs.changes.outputs['all-tools'] == 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,15 +51,15 @@ jobs:
with:
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
image_name: ${{ env.DOCKER_IMAGE_NAME }}
image_name: consensys/linea-alltools
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

all-tools-tag-only:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: All tools tag only
needs: [ changes, store_image_name_and_tags, check_image_tags_exist ]
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.all-tools == 'false' }}
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs['all-tools'] == 'false' }}
outputs:
image_tagged: ${{ steps.image_tag_push.outputs.image_tagged }}
steps:
Expand All @@ -75,20 +74,20 @@ jobs:
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
develop_tag: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store_image_name_and_tags.outputs.untested_tag_suffix }}
image_name: ${{ env.DOCKER_IMAGE_NAME }}
image_name: consensys/linea-alltools
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists }}
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists }}
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

build-and-publish:
needs: [ changes, store_image_name_and_tags, all-tools-tag-only ]
if: ${{ always() && (needs.changes.outputs.all-tools == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
runs-on: ubuntu-22.04
if: ${{ always() && (needs.changes.outputs['all-tools'] == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
runs-on: [self-hosted, ubuntu-20.04, X64, small]
env:
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
IMAGE_NAME: consensys/linea-alltools
name: All tools build and push
steps:
- name: Checkout
Expand All @@ -98,7 +97,7 @@ jobs:
submodules: true
persist-credentials: false
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -116,15 +115,13 @@ jobs:
- name: Show the "version" build argument
run: |
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> GITHUB_ENV
- name: Build and push all tools image
uses: docker/build-push-action@v6
with:
context: .
file: ./operations/Dockerfile
platforms: linux/amd64
# Note: Build amd64 image only
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64 # Note: Build amd64 image only
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bridge-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
run-e2e-tests:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ on:

jobs:
publish:
runs-on: besu-arm64
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -31,15 +30,13 @@ jobs:
run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV

- name: Login to Docker Repository
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker Image Build and Publish
id: docker-build-publish
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cache-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Filter commit changes
outputs:
cache-images: ${{ steps.filter.outputs.cache-images }}
Expand All @@ -31,12 +31,12 @@ jobs:
pull-and-cache-images:
needs: [ changes ]
if: ${{ always() && needs.changes.outputs.cache-images == 'true' }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-20.04, X64, medium]
permissions:
actions: read
contents: read
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ on:

concurrency:
group: coordinator-build-and-publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build-and-publish:
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Coordinator build
environment: docker-build-and-e2e
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand All @@ -54,17 +53,16 @@ jobs:
- name: Build dist
run: |
./gradlew coordinator:app:distZip --no-daemon
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: coordinator
uses: docker/metadata-action@v3
Expand Down
43 changes: 7 additions & 36 deletions .github/workflows/coordinator-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

concurrency:
group: coordinator-testing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
cache-docker-images:
Expand All @@ -24,7 +24,7 @@ jobs:
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, medium]
name: Coordinator tests
steps:
- name: Checkout
Expand All @@ -51,6 +51,11 @@ jobs:
- name: Build coordinator and Unit tests
run: |
./gradlew -V coordinator:app:buildNeeded
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run integration tests
run: |
./gradlew integrationTest
Expand All @@ -64,40 +69,6 @@ jobs:
if-no-files-found: error
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: ReportGenerator
uses: danielpalme/[email protected]
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
reporttypes: MarkdownSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: DeltaReportGenerator
uses: danielpalme/[email protected]
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports'
reporttypes: MarkdownDeltaSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: Upload coverage report artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: CoverageReport
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports
- name: Write code coverage delta to PR
uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports/DeltaSummary.md
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finalized-tag-updater-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
release:
runs-on: ubuntu-24.04
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

jobs:
run-load-test:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Run Load Test
steps:
- name: Checkout
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: main

on:
pull_request:
push:
branches:
- main

jobs:
store-image-name-and-tags:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

filter-commit-changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
name: Filter commit changes
outputs:
coordinator: ${{ steps.filter.outputs.coordinator }}
Expand Down Expand Up @@ -106,8 +109,17 @@ jobs:
traces_api_facade_changed: ${{ needs.filter-commit-changes.outputs.traces-api-facade }}
secrets: inherit

docker-build:
manual-docker-build-and-e2e-tests:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
steps:
- name: Deploy environment
run: |
echo "Build and e2e test environment deployed"
docker-build:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images, manual-docker-build-and-e2e-tests ]
uses: ./.github/workflows/build-and-publish.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand Down Expand Up @@ -150,11 +162,11 @@ jobs:
secrets: inherit

run-e2e-tests-geth-tracing:
needs: [ store-image-name-and-tags, docker-build ]
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
if: ${{ always() && needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand All @@ -164,11 +176,11 @@ jobs:
secrets: inherit

run-e2e-tests:
needs: [ store-image-name-and-tags, docker-build ]
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
if: ${{ always() && needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand All @@ -191,7 +203,7 @@ jobs:
cleanup-deployments:
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() }}
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
release:
runs-on: ubuntu-24.04
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 5b36c0f

Please sign in to comment.