Skip to content

test - Release 2.60.10 from branch executed by @lystopad #4

test - Release 2.60.10 from branch executed by @lystopad

test - Release 2.60.10 from branch executed by @lystopad #4

name: Release 2.60x with testing steps
run-name: test - Release ${{ inputs.release_version }} from branch ${{ inputs.checkout_ref }} executed by @${{ github.actor }}
env:
APPLICATION: "erigon"
BUILDER_IMAGE: "golang:1.22-bookworm"
TARGET_BASE_IMAGE: "debian:12.7-slim"
APP_REPO: "erigontech/erigon"
CHECKOUT_REF: "release/2.60"
DOCKERHUB_REPOSITORY: "erigontech/dev-erigon"
RELEASE_VERSION: "v2.60.102"
LABEL_DESCRIPTION: "Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."
on:
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: 'Release version number (Pattern - v#.#.# , f.e. v2.60.1 or v3.0.0 or v3.0.0-alpha1 for pre-releases. Use prefix "v".)'
jobs:
build-release:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Fast checkout git repository devops-testing-workflows
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
with:
repository: erigontech/devops-testing-workflows
fetch-depth: 1
path: 'devops-testing-workflows'
- name: Fast checkout git repository in order to get commit id for further checkouts by this workflow
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
with:
repository: ${{ env.APP_REPO }}
fetch-depth: 0
ref: ${{ env.CHECKOUT_REF }}
path: 'erigon'
- name: Get commit id
id: getCommitId
run: |
mkdir ${GITHUB_WORKSPACE}/build-arm64 ${GITHUB_WORKSPACE}/build-amd64 ${GITHUB_WORKSPACE}/build-amd64v2
cd erigon
echo "id=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "short_commit_id=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
echo "week_of_the_year=$(/bin/date -u "+%Y-%W")" >> $GITHUB_OUTPUT
cd ..
echo GITHUB_WORKSPACE=${GITHUB_WORKSPACE} and pwd=$(pwd)
echo
echo "ls -l .."
ls -l ../
- name: Configure go build and pkg cache for one week only
id: cache
uses: actions/cache@v4
with:
key: cache-year-week-${{ steps.getCommitId.outputs.week_of_the_year }}-go.mod-hash:${{ hashFiles('erigon/go.mod') }}
path: |
~/go/pkg
~/.cache
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 ## v3.3.0
with:
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf ## v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db ## v3.6.1
- name: build arm64
run: >
docker run --platform linux/arm64
--rm
-v $(pwd)/erigon:/erigon:ro
-v ${GITHUB_WORKSPACE}/build-arm64:/erigon-build
-v ${HOME}/.cache:/root/.cache
-v ${HOME}/go/pkg/mod:/go/pkg/mod
-w /erigon --entrypoint /bin/bash
${{ env.BUILDER_IMAGE }}
-c "git config --global --add safe.directory /erigon;
make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm
erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool"
- name: build amd64
run: |
docker run --platform linux/amd64 \
--rm -v $(pwd)/erigon:/erigon:ro \
-v ${GITHUB_WORKSPACE}/build-amd64:/erigon-build \
-v ${HOME}/.cache:/root/.cache \
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
-w /erigon --entrypoint /bin/bash \
${{ env.BUILDER_IMAGE }} \
-c "git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v1 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool; find / -name libsilkworm_capi.so -exec install {} /erigon-build \; "
- name: build amd64v2
run: |
docker run --platform linux/amd64/v2 \
--rm -v $(pwd)/erigon:/erigon:ro \
-v ${GITHUB_WORKSPACE}/build-amd64v2:/erigon-build \
-v ${HOME}/.cache:/root/.cache \
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
-w /erigon --entrypoint /bin/bash \
${{ env.BUILDER_IMAGE }} \
-c "git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool; find / -name libsilkworm_capi.so -exec install {} /erigon-build \; "
- name: Pack Artifacts
run: |
cd ${GITHUB_WORKSPACE}
mkdir $GITHUB_WORKSPACE/release
for dir in build-*; do
cd $dir
echo Current directory is $(pwd) . Checksum file and archive will be created for this directory
sha256sum * > checksums.txt
tar czvf $GITHUB_WORKSPACE/release/${APPLICATION}_${{ inputs.release_version }}_linux_$(echo $dir | sed 's,build-,,').tar.gz \
--transform "s,^./,${APPLICATION}_${{ inputs.release_version }}_linux_$(echo $dir | sed 's,build-,,')/," .
cd -
done
cd $GITHUB_WORKSPACE/release
sha256sum * > ${APPLICATION}_${{ inputs.release_version }}_checksums.txt
find . -type f -ls
- name: Upload Artifact - checksums.txt
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_checksums.txt
path: ${{ github.workspace }}/release/checksums.txt
retention-days: 7
compression-level: 0
- name: Upload Artifact - arm64
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
retention-days: 7
compression-level: 0
- name: Upload Artifact - amd64
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
retention-days: 7
compression-level: 0
- name: Upload Artifact - amd64v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
retention-days: 7
compression-level: 0
test-release:
name: Test release on platform ${{ matrix.id }}
runs-on: ${{ matrix.runner }}
needs: [ build-release ]
strategy:
matrix:
include:
- id: linux/amd64
#runner: ubuntu-latest-release-test-amd64
runner: ubuntu-latest
artifact: linux_amd64.tar.gz
- id: linux/amd64/v2
#runner: ubuntu-latest-release-test-amd64
runner: ubuntu-latest
artifact: linux_amd64v2.tar.gz
- id: linux/arm64
#runner: ubuntu-latest-release-test-arm64
runner: ubuntu-latest
artifact: linux_arm64.tar.gz
steps:
- name: Set up Python
uses: actions/setup-python@v4
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}
- name: Extract artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}
run: |
pwd
ls -lR .
ls -l ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}
publish-release:
name: Publish release
runs-on: ubuntu-latest
needs: [ test-release ]
steps:
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz