test - Release v2.60.103-testing2 from branch executed by @lystopad #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: testing-release-with-qa-test-job | |
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" | |
TEST_TRACKING_TIME_SECONDS: 7200 # 2 hours | |
TEST_TOTAL_TIME_SECONDS: 18000 # 5 hours | |
TEST_CHAIN: "mainnet" | |
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/${{ env.APPLICATION }}_${{ inputs.release_version }}_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 on ${{ matrix.id }} | |
runs-on: ${{ matrix.runner }} | |
needs: [ build-release ] | |
strategy: | |
matrix: | |
include: | |
- id: linux/amd64 | |
#runner: ubuntu-latest-release-test-amd64 | |
#runner: ubuntu-latest-devops-large | |
runner: BMHZ-QA-Test_Runner-Erigon-n5 | |
artifact: linux_amd64 | |
- id: linux/amd64/v2 | |
#runner: ubuntu-latest-release-test-amd64 | |
#runner: ubuntu-latest-devops-large | |
runner: BMHZ-QA-Test_Runner-Erigon-n5 | |
artifact: linux_amd64v2 | |
- id: linux/arm64 | |
#runner: ubuntu-latest-release-test-arm64 | |
#runner: ubuntu-latest-devops-large-arm | |
runner: BMHZ-QA-Test_Runner-Erigon-n6 | |
artifact: linux_arm64 | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}.tar.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}.tar.gz | |
path: . | |
- name: Extract artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}.tar.gz | |
run: | | |
pwd | |
ls -l ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}.tar.gz | |
tar xzvf ${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }}.tar.gz | |
ls -lR | |
- name: Fast checkout git repository erigontech/erigon-qa | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release | |
with: | |
token: ${{ secrets.ORG_GITHUB_ERIGONTECH_ERIGON_QA_READ }} | |
repository: erigontech/erigon-qa | |
fetch-depth: 1 | |
ref: main | |
path: erigon-qa | |
- name: Checkout QA Tests Repository & Install Requirements | |
run: | | |
cd ./erigon-qa/test_system | |
pwd | |
ls -lao | |
pip3 install -r requirements.txt | |
ln -s $(pwd)/base_library $(pwd)/qa-tests/tip-tracking/base_library | |
echo "DEBUG -- content of directory $(pwd) :" | |
ls -l | |
echo "DEBUG -- content of directory $(pwd)/qa-tests/tip-tracking/" | |
ls -l $(pwd)/qa-tests/tip-tracking/ | |
echo "DEBUG -- content of directory GITHUB_WORKSPACE ${GITHUB_WORKSPACE} :" | |
ls -l ${GITHUB_WORKSPACE} | |
echo "DEBUG -- end." | |
mkdir ${RUNNER_WORKSPACE}/erigon-data | |
# Run Erigon, wait sync and check ability to maintain sync | |
python3 qa-tests/tip-tracking/run_and_check_tip_tracking.py \ | |
${GITHUB_WORKSPACE}/${{ env.APPLICATION }}_${{ inputs.release_version }}_${{ matrix.artifact }} \ | |
${RUNNER_WORKSPACE}/erigon-data ${{ env.TEST_TRACKING_TIME_SECONDS }} ${{ env.TEST_TOTAL_TIME_SECONDS }} Erigon2 ${{ env.TEST_CHAIN }} | |
# Capture monitoring script exit status | |
test_exit_status=$? | |
# Save the subsection reached status | |
echo "::set-output name=test_executed::true" | |
# Check test runner script exit status | |
if [ $test_exit_status -eq 0 ]; then | |
echo "Tests completed successfully" | |
echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT" | |
else | |
echo "Error detected during tests" | |
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT" | |
fi | |
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: . | |
- 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: . | |
- 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: . | |
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_checksums.txt | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_checksums.txt | |
path: . | |
- name: Debug output | |
run: | | |
pwd | |
ls -lao | |