Skip to content

Commit ce723ca

Browse files
committed
test
1 parent ed4e949 commit ce723ca

File tree

1 file changed

+218
-0
lines changed

1 file changed

+218
-0
lines changed
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
name: Testing Rel 2.60
2+
run-name: "Testing Rel 2.60"
3+
4+
env:
5+
APPLICATION: "erigon"
6+
BUILDER_IMAGE: "golang:1.22-bookworm"
7+
TARGET_BASE_IMAGE: "debian:12.7-slim"
8+
APP_REPO: "erigontech/erigon"
9+
CHECKOUT_REF: "release/2.60"
10+
DOCKERHUB_REPOSITORY: "erigontech/dev-erigon"
11+
RELEASE_VERSION: "v2.60.102"
12+
LABEL_DESCRIPTION: "Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."
13+
14+
on:
15+
workflow_dispatch:
16+
17+
jobs:
18+
19+
build-release:
20+
runs-on: ubuntu-22.04
21+
timeout-minutes: 60
22+
23+
steps:
24+
25+
- name: Fast checkout git repository devops-testing-workflows
26+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
27+
with:
28+
repository: erigontech/devops-testing-workflows
29+
fetch-depth: 1
30+
path: 'devops-testing-workflows'
31+
32+
- name: Fast checkout git repository in order to get commit id for further checkouts by this workflow
33+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
34+
with:
35+
repository: ${{ env.APP_REPO }}
36+
fetch-depth: 0
37+
ref: ${{ env.CHECKOUT_REF }}
38+
path: 'erigon'
39+
40+
- name: Get commit id
41+
id: getCommitId
42+
run: |
43+
mkdir ${GITHUB_WORKSPACE}/build-arm64 ${GITHUB_WORKSPACE}/build-amd64 ${GITHUB_WORKSPACE}/build-amd64v2
44+
cd erigon
45+
echo "id=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
46+
echo "short_commit_id=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
47+
echo "week_of_the_year=$(/bin/date -u "+%Y-%W")" >> $GITHUB_OUTPUT
48+
cd ..
49+
echo GITHUB_WORKSPACE=${GITHUB_WORKSPACE} and pwd=$(pwd)
50+
echo
51+
echo "ls -l .."
52+
ls -l ../
53+
54+
- name: Configure go build and pkg cache for one week only
55+
id: cache
56+
uses: actions/cache@v4
57+
with:
58+
key: cache-year-week-${{ steps.getCommitId.outputs.week_of_the_year }}-go.mod-hash:${{ hashFiles('erigon/go.mod') }}
59+
path: |
60+
~/go/pkg
61+
~/.cache
62+
63+
- name: Login to Docker Hub
64+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 ## v3.3.0
65+
with:
66+
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
67+
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}
68+
69+
- name: Set up QEMU
70+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf ## v3.2.0
71+
72+
- name: Set up Docker Buildx
73+
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db ## v3.6.1
74+
75+
- name: build arm64
76+
run: >
77+
docker run --platform linux/arm64
78+
--rm
79+
-v $(pwd)/erigon:/erigon:ro
80+
-v ${GITHUB_WORKSPACE}/build-arm64:/erigon-build
81+
-v ${HOME}/.cache:/root/.cache
82+
-v ${HOME}/go/pkg/mod:/go/pkg/mod
83+
-w /erigon --entrypoint /bin/bash
84+
${{ env.BUILDER_IMAGE }}
85+
-c "git config --global --add safe.directory /erigon;
86+
make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm
87+
erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool"
88+
89+
- name: build amd64
90+
run: |
91+
docker run --platform linux/amd64 \
92+
--rm -v $(pwd)/erigon:/erigon:ro \
93+
-v ${GITHUB_WORKSPACE}/build-amd64:/erigon-build \
94+
-v ${HOME}/.cache:/root/.cache \
95+
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
96+
-w /erigon --entrypoint /bin/bash \
97+
${{ env.BUILDER_IMAGE }} \
98+
-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 \; "
99+
100+
- name: build amd64v2
101+
run: |
102+
docker run --platform linux/amd64/v2 \
103+
--rm -v $(pwd)/erigon:/erigon:ro \
104+
-v ${GITHUB_WORKSPACE}/build-amd64v2:/erigon-build \
105+
-v ${HOME}/.cache:/root/.cache \
106+
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
107+
-w /erigon --entrypoint /bin/bash \
108+
${{ env.BUILDER_IMAGE }} \
109+
-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 \; "
110+
111+
- name: Pack Artifacts
112+
run: |
113+
cd ${GITHUB_WORKSPACE}
114+
mkdir $GITHUB_WORKSPACE/release
115+
for dir in build-*; do
116+
cd $dir
117+
echo Current directory is $(pwd) . Checksum file and archive will be created for this directory
118+
sha256sum * > checksums.txt
119+
tar czvf $GITHUB_WORKSPACE/release/${APPLICATION}_${RELEASE_VERSION}_linux_$(echo $dir | sed 's,build-,,').tar.gz \
120+
--transform "s,^./,${APPLICATION}_${RELEASE_VERSION}_linux_$(echo $dir | sed 's,build-,,')/," .
121+
cd -
122+
done
123+
cd $GITHUB_WORKSPACE/release
124+
sha256sum * > ${APPLICATION}_${RELEASE_VERSION}_checksums.txt
125+
find . -type f -ls
126+
127+
- name: Upload Artifact - checksums.txt
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: ${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_checksums.txt
131+
path: ${{ github.workspace }}/release/checksums.txt
132+
retention-days: 7
133+
compression-level: 0
134+
135+
- name: Upload Artifact - arm64
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: ${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_arm64.tar.gz
139+
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_arm64.tar.gz
140+
retention-days: 7
141+
compression-level: 0
142+
143+
- name: Upload Artifact - amd64
144+
uses: actions/upload-artifact@v4
145+
with:
146+
name: ${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_amd64.tar.gz
147+
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_amd64.tar.gz
148+
retention-days: 7
149+
compression-level: 0
150+
151+
- name: Upload Artifact - amd64v2
152+
uses: actions/upload-artifact@v4
153+
with:
154+
name: ${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_amd64v2.tar.gz
155+
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ env.RELEASE_VERSION }}_linux_amd64v2.tar.gz
156+
retention-days: 7
157+
compression-level: 0
158+
159+
test-release:
160+
name: Test release on platform ${{ matrix.id }}
161+
runs-on: ${{ matrix.runner }}
162+
needs: [ build-release ]
163+
strategy:
164+
matrix:
165+
include:
166+
- id: linux/amd64
167+
#runner: ubuntu-latest-release-test-amd64
168+
runner: ubuntu-latest
169+
artifact: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
170+
- id: linux/amd64/v2
171+
#runner: ubuntu-latest-release-test-amd64
172+
runner: ubuntu-latest
173+
artifact: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
174+
- id: linux/arm64
175+
#runner: ubuntu-latest-release-test-arm64
176+
runner: ubuntu-latest
177+
artifact: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
178+
179+
180+
steps:
181+
- name: Set up Python
182+
uses: actions/setup-python@v4
183+
184+
- name: Download artifact ${{ matrix.artifact }}
185+
uses: actions/download-artifact@v4
186+
with:
187+
name: ${{ matrix.artifact }}
188+
path: ${{ matrix.artifact }}
189+
190+
- name: Extract artifact ${{ matrix.artifact }}
191+
run: |
192+
pwd
193+
ls -lR .
194+
195+
196+
publish-release:
197+
name: Publish release
198+
runs-on: ubuntu-latest
199+
needs: [ test-release ]
200+
201+
steps:
202+
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
203+
uses: actions/download-artifact@v4
204+
with:
205+
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
206+
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
207+
208+
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
209+
uses: actions/download-artifact@v4
210+
with:
211+
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
212+
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
213+
214+
- name: Download artifact ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
215+
uses: actions/download-artifact@v4
216+
with:
217+
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
218+
path: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz

0 commit comments

Comments
 (0)