Skip to content

Commit

Permalink
Release workflow: new binary testing job for amd64 and arm64 architec…
Browse files Browse the repository at this point in the history
…tures. (#13463)

This change add extra job which may take ~8-10h for each release
process.
The extra job performs tests for freshly built binaries for amd64 and
arm64.
Note, binary for amd64v2 does not configured for such tests due to lack
of runners/time.

Thanks @mriccobene for support 👍 

Requested in
erigontech/devops-metarepo-for-issues#15
  • Loading branch information
lystopad authored Jan 16, 2025
1 parent dfca217 commit abcd9d2
Showing 1 changed file with 89 additions and 3 deletions.
92 changes: 89 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ run-name: Build release ${{ inputs.release_version}} from branch ${{ inputs.chec

env:
APPLICATION: "erigon"
APPLICATION_VERSION: "Erigon3"
TEST_TRACKING_TIME_SECONDS: 7200 # 2 hours
TEST_TOTAL_TIME_SECONDS: 432000 # 5 days
TEST_CHAIN: "mainnet"
BUILDER_IMAGE: "golang:1.22-bookworm"
DOCKER_BASE_IMAGE: "debian:12.8-slim"
APP_REPO: "erigontech/erigon"
Expand Down Expand Up @@ -193,17 +197,99 @@ jobs:
if-no-files-found: error


test-release:
name: test on ${{ matrix.id }}
runs-on: [ self-hosted, Release, "${{ matrix.runner-arch }}" ]
timeout-minutes: 7200 # 5 days
needs: [ build-release ]
strategy:
matrix:
include:
- id: linux/amd64
runner-arch: X64
artifact: linux_amd64
- id: linux/arm64
runner-arch: ARM64
artifact: linux_arm64

steps:

- name: Cleanup working directory
run: rm -drfv *

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- 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."
rm -rf ${RUNNER_WORKSPACE}/erigon-data || true
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 }} ${{ env.APPLICATION_VERSION }} ${{ 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
- name: Cleanup working directory
run: rm -drfv *

build-debian-pkg:
name: Debian packages
needs: [ build-release ]
needs: [ build-release, test-release ]
uses: erigontech/erigon/.github/workflows/reusable-release-build-debian-pkg.yml@main
with:
application: ${{ needs.build-release.outputs.application }}
version: ${{ needs.build-release.outputs.parsed-version }}


publish-docker-image:
needs: [ build-release ]
needs: [ build-release, test-release ]
runs-on: ubuntu-latest
timeout-minutes: 30
name: Docker image
Expand Down Expand Up @@ -339,7 +425,7 @@ jobs:
In-case-of-failure:
name: "In case of failure: remove remote git tag pointing to the new version."
needs: [ publish-release, build-release ]
needs: [ publish-release, build-release, test-release ]
if: always() && !contains(needs.build-release.result, 'success')
runs-on: ubuntu-22.04

Expand Down

0 comments on commit abcd9d2

Please sign in to comment.