chore: Remove unused CI pipeline (#777)

* chore: Remove unused CI pipeline

* feat: removed all actions cache related codes in workflows

* chore: Improve comment

---------

Co-authored-by: jonesho <jones.ho@consensys.net>
This commit is contained in:
Alain Nicolas
2025-03-14 14:19:08 +01:00
committed by GitHub
parent 9988ebbee0
commit 7d871aff3f
7 changed files with 2 additions and 166 deletions

View File

@@ -1,35 +0,0 @@
name: 'Compute Docker Images Hash'
description: 'Compute Docker Images Hash for Cache Key'
outputs:
docker_images_hash:
description: 'Docker Images Hash'
value: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES_HASH }}
docker_images_trimmed:
description: 'Trimmed List of Docker Images'
value: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES_TRIMMED }}
runs:
using: 'composite'
steps:
- name: Compute docker images hash
id: compute-docker-images-hash
shell: bash
run: |
docker_images_traces_v1=$(docker compose -f docker/compose-tracing-v1-ci-extension.yml --profile l1 --profile l2 config 2>/dev/null | grep "image:" | awk '{print $2}')
docker_images_traces_v2=$(docker compose -f docker/compose-tracing-v2-ci-extension.yml --profile l1 --profile l2 config 2>/dev/null | grep "image:" | awk '{print $2}')
docker_images=$(echo "$docker_images_traces_v1 $docker_images_traces_v2")
docker_images_unique=$(echo $docker_images | xargs -n1 | sort -u)
docker_images_trimmed=$(echo $docker_images_unique | xargs -n1 | grep -Ev "linea-postman|linea-coordinator|linea-transaction-exclusion-api|linea-traces-api-facade|linea-prover" | xargs)
echo DOCKER_IMAGES=$(echo $docker_images) >> $GITHUB_OUTPUT
echo DOCKER_IMAGES_UNIQUE=$(echo $docker_images_unique) >> $GITHUB_OUTPUT
echo DOCKER_IMAGES_TRIMMED=$(echo $docker_images_trimmed) >> $GITHUB_OUTPUT
echo DOCKER_IMAGES_HASH=$(echo -n $docker_images_trimmed | sha256sum | awk '{print $1}') >> $GITHUB_OUTPUT
- name: Show docker images hash
shell: bash
id: show-docker-images-hash
run: |
echo "DOCKER_IMAGES: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES }}"
echo "DOCKER_IMAGES_UNIQUE: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES_UNIQUE }}"
echo "DOCKER_IMAGES_TRIMMED: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES_TRIMMED }}"
echo "DOCKER_IMAGES_HASH: ${{ steps.compute-docker-images-hash.outputs.DOCKER_IMAGES_HASH }}"

View File

@@ -1,25 +0,0 @@
name: 'Restore Cached Docker Images'
description: 'Restore Cached Docker Images'
runs:
using: 'composite'
steps:
- name: Compute docker images hash
id: compute-docker-images-hash
uses: ./.github/actions/compute-docker-images-hash
- name: Create cached docker images folder
shell: bash
run: |
mkdir -p ~/docker-images-cached
- name: Cache common docker images
id: cache-common-docker-images
continue-on-error: true
uses: actions/cache/restore@v4.2.0
with:
path: ~/docker-images-cached
key: docker-images-cache-${{ steps.compute-docker-images-hash.outputs.docker_images_hash }}
- name: Load docker images
shell: bash
if: steps.cache-common-docker-images.outputs.cache-hit == 'true'
run: |
docker load -i ~/docker-images-cached/docker-images.tar

View File

@@ -1,80 +0,0 @@
name: Cache Docker Images CI
on:
workflow_call:
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false
jobs:
check-dockerhub-secrets-present:
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-small
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
name: Check if DockerHub secrets are present
outputs:
secrets_present: ${{ steps.check-secrets-present-step.outputs.DOCKERHUB_SECRET_PRESENT }}
steps:
- id: check-secrets-present-step
run: |
echo DOCKERHUB_SECRET_PRESENT=${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }} >> $GITHUB_OUTPUT
changes:
needs: [ check-dockerhub-secrets-present ]
if: ${{ always() && needs.check-dockerhub-secrets-present.outputs.secrets_present == 'true' }}
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-small
name: Filter commit changes
outputs:
cache_images: ${{ steps.filter.outputs.cache_images }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Filter commit changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
cache_images:
- 'docker/compose-*.yml'
pull-and-cache-images:
needs: [ check-dockerhub-secrets-present, changes ]
if: ${{ always() && needs.check-dockerhub-secrets-present.outputs.secrets_present == 'true' && needs.changes.outputs.cache_images == 'true' }}
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
name: Pull and cache images
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compute docker images hash
id: compute-docker-images-hash
uses: ./.github/actions/compute-docker-images-hash
- name: Create cached docker images folder
run: |
mkdir -p ~/docker-images-cached
- name: Cache common docker images
id: cache-common-docker-images
uses: actions/cache@v4.2.0
with:
path: ~/docker-images-cached
key: docker-images-cache-${{ steps.compute-docker-images-hash.outputs.docker_images_hash }}
lookup-only: true
- name: Login to Docker Hub
if: steps.cache-common-docker-images.outputs.cache-hit != 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull docker images
if: steps.cache-common-docker-images.outputs.cache-hit != 'true'
run: |
COMPOSE_PROFILES=l1,l2 docker compose -f docker/compose-tracing-v1-ci-extension.yml pull && \
COMPOSE_PROFILES=l1,l2 docker compose -f docker/compose-tracing-v2-ci-extension.yml pull
- name: Cache docker images
if: steps.cache-common-docker-images.outputs.cache-hit != 'true'
run: |
docker save ${{ steps.compute-docker-images-hash.outputs.docker_images_trimmed }} -o ~/docker-images-cached/docker-images.tar
echo docker-images.tar=$(ls -lh ~/docker-images-cached/docker-images.tar)

View File

@@ -37,12 +37,6 @@ jobs:
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 #v4.2.1
# Disable cache for pulling docker images as empirically found that this
# (retrieving cache and loading docker images) actually increased test time-to-completion
# - name: Restore cached images
# id: restore-cached-images
# uses: ./.github/actions/restore-docker-images
# continue-on-error: true
# Install pnpm to compile smart contracts
- name: Setup nodejs environment
uses: ./.github/actions/setup-nodejs

View File

@@ -97,12 +97,6 @@ jobs:
run: |
mkdir -p tmp/local/traces/v2/conflated
chmod -R a+rw tmp/local/
# Disable cache for pulling docker images as empirically found that this
# (retrieving cache and loading docker images) actually increased test time-to-completion
# - name: Restore cached images
# id: restore-cached-images
# uses: ./.github/actions/restore-docker-images
# continue-on-error: true
- name: Pull all images with retry
uses: nick-fields/retry@v3
with:

View File

@@ -37,12 +37,6 @@ jobs:
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 #v4.2.1
# Disable cache for pulling docker images as empirically found that this
# (retrieving cache and loading docker images) actually increased test time-to-completion
# - name: Restore cached images
# id: restore-cached-images
# uses: ./.github/actions/restore-docker-images
# continue-on-error: true
- name: Staterecovery - Build and Unit tests
run: |
./gradlew state-recovery:besu-plugin:buildNeeded

View File

@@ -26,14 +26,9 @@ on:
type: string
jobs:
# Disable cache for pulling docker images as empirically found that this
# (retrieving cache and loading docker images) actually increased test time-to-completion
# cache-docker-images:
# uses: ./.github/workflows/cache-docker-images.yml
# secrets: inherit
# Cache for pulling Docker images is disabled as we empirically found that this
# (retrieving cache and loading Docker images) actually increased test time-to-completion
coordinator:
# needs: [ cache-docker-images ]
uses: ./.github/workflows/coordinator-testing.yml
if: ${{ inputs.coordinator_changed == 'true' }}
with:
@@ -60,7 +55,6 @@ jobs:
secrets: inherit
staterecovery:
# needs: [ cache-docker-images ]
uses: ./.github/workflows/staterecovery-testing.yml
if: ${{ inputs.staterecovery_changed == 'true' }}
with: