Skip to content

Commit af3ef5a

Browse files
committed
Re-enable the ARM packaging
1 parent 17e74c0 commit af3ef5a

File tree

2 files changed

+91
-8
lines changed

2 files changed

+91
-8
lines changed

.github/workflows/release.yml

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,85 @@ jobs:
155155
./dist/*.deb
156156
./dist/*.rpm
157157
retention-days: 2
158+
build-arm:
159+
name: Linux ARM release asset
160+
runs-on: ubuntu-latest
161+
steps:
162+
- name: Install packages
163+
env:
164+
DEBIAN_FRONTEND: "noninteractive"
165+
TZ: "Etc/UTC"
166+
run: |
167+
sudo apt-get -qq update
168+
sudo apt-get -qq -y install binfmt-support qemu-user-static
169+
- name: Checkout code
170+
uses: actions/checkout@v2
171+
- name: Build project
172+
id: make_dist
173+
run: |
174+
make dist-arm
175+
cd dist
176+
ARCHIVE=$(echo nimbus-eth2_Linux_arm32v7_*.tar.gz)
177+
echo "::set-output name=archive::"${ARCHIVE}
178+
echo "::set-output name=archive_dir::"${ARCHIVE%.tar.gz}
179+
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_beacon_node.sha512sum
180+
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_validator_client.sha512sum
181+
- name: Upload archive artefact
182+
uses: actions/upload-artifact@v2
183+
with:
184+
name: Linux_arm_archive
185+
path: ./dist/${{ steps.make_dist.outputs.archive }}
186+
retention-days: 2
187+
- name: Upload BN checksum artefact
188+
uses: actions/upload-artifact@v2
189+
with:
190+
name: Linux_arm_checksum
191+
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum
192+
retention-days: 2
193+
- name: Upload VC checksum artefact
194+
uses: actions/upload-artifact@v2
195+
with:
196+
name: Linux_arm_checksum
197+
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_validator_client.sha512sum
198+
retention-days: 2
199+
- name: Login to Docker Hub
200+
uses: docker/login-action@v1
201+
with:
202+
username: ${{ secrets.DOCKERHUB_USERNAME }}
203+
password: ${{ secrets.DOCKERHUB_TOKEN }}
204+
- name: Build and push a Docker images for end users
205+
run: |
206+
cd dist
207+
tar -xzf ${{ steps.make_dist.outputs.archive }}
208+
mv ${{ steps.make_dist.outputs.archive_dir }} ../docker/dist/binaries/nimbus-eth2
209+
cd ../docker/dist/binaries
210+
REFNAME="${{ github.ref }}"
211+
TAG="${REFNAME#refs/tags/}"
212+
cp -a /usr/bin/qemu-arm-static .
213+
DOCKER_BUILDKIT=1 docker build -f Dockerfile.bn.arm -t statusim/nimbus-eth2:arm-${TAG} -t statusim/nimbus-eth2:arm-latest .
214+
docker push statusim/nimbus-eth2:arm-${TAG}
215+
docker push statusim/nimbus-eth2:arm-latest
216+
217+
DOCKER_BUILDKIT=1 docker build -f Dockerfile.vc.arm -t statusim/nimbus-validator-client:arm-${TAG} -t statusim/nimbus-validator-client:arm-latest .
218+
docker push statusim/nimbus-validator-client:arm-${TAG}
219+
docker push statusim/nimbus-validator-client:arm-latest
220+
221+
- name: Setup ruby # Needed for fpm
222+
uses: ruby/setup-ruby@v1
223+
with:
224+
ruby-version: '3.1' # Not needed with a .ruby-version file
225+
- name: Create RPM/DEB
226+
run: |
227+
scripts/make_packages.sh -b nimbus_beacon_node -t dist/*.tar.gz --install-fpm
228+
scripts/make_packages.sh -b nimbus_validator_client -t dist/*.tar.gz --install-fpm
229+
- name: Upload DEB
230+
uses: actions/upload-artifact@v3
231+
with:
232+
name: Linux_arm_packages
233+
path: |
234+
./dist/*.deb
235+
./dist/*.rpm
236+
retention-days: 2
158237
build-win64:
159238
name: Windows AMD64 release asset
160239
runs-on: ubuntu-latest
@@ -259,7 +338,7 @@ jobs:
259338
retention-days: 2
260339
prepare-release:
261340
name: Prepare release draft
262-
needs: [build-amd64, build-arm64, build-win64, build-macos-amd64, build-macos-arm64]
341+
needs: [build-amd64, build-arm64, build-arm, build-win64, build-macos-amd64, build-macos-arm64]
263342
runs-on: ubuntu-latest
264343
steps:
265344
- name: Download artefacts
@@ -285,6 +364,8 @@ jobs:
285364
cat Linux_amd64_checksum/* >> release_notes.md
286365
echo '# Linux ARM64' >> release_notes.md
287366
cat Linux_arm64_checksum/* >> release_notes.md
367+
echo '# Linux ARM' >> release_notes.md
368+
cat Linux_arm_checksum/* >> release_notes.md
288369
echo '# Windows AMD64' >> release_notes.md
289370
cat Windows_amd64_checksum/* >> release_notes.md
290371
echo '# macOS AMD64' >> release_notes.md
@@ -306,6 +387,8 @@ jobs:
306387
Linux_amd64_packages/*
307388
Linux_arm64_archive/*
308389
Linux_arm64_packages/*
390+
Linux_arm_archive/*
391+
Linux_arm_packages/*
309392
Windows_amd64_archive/*
310393
macOS_amd64_archive/*
311394
macOS_arm64_archive/*
@@ -320,6 +403,9 @@ jobs:
320403
Linux_arm64_archive
321404
Linux_arm64_checksum
322405
Linux_arm64_packages
406+
Linux_arm_archive
407+
Linux_arm_checksum
408+
Linux_arm_packages
323409
Windows_amd64_archive
324410
Windows_amd64_checksum
325411
macOS_amd64_archive
@@ -341,19 +427,23 @@ jobs:
341427
statusim/nimbus-eth2:multiarch-${TAG} \
342428
--amend statusim/nimbus-eth2:amd64-${TAG} \
343429
--amend statusim/nimbus-eth2:arm64-${TAG} \
430+
--amend statusim/nimbus-eth2:arm-${TAG}
344431
docker manifest push statusim/nimbus-eth2:multiarch-${TAG}
345432
docker manifest create \
346433
statusim/nimbus-eth2:multiarch-latest \
347434
--amend statusim/nimbus-eth2:amd64-latest \
348435
--amend statusim/nimbus-eth2:arm64-latest \
436+
--amend statusim/nimbus-eth2:arm-latest
349437
docker manifest push statusim/nimbus-eth2:multiarch-latest
350438
docker manifest create \
351439
statusim/nimbus-validator-client:multiarch-${TAG} \
352440
--amend statusim/nimbus-validator-client:amd64-${TAG} \
353441
--amend statusim/nimbus-validator-client:arm64-${TAG} \
442+
--amend statusim/nimbus-validator-client:arm-${TAG}
354443
docker manifest push statusim/nimbus-validator-client:multiarch-${TAG}
355444
docker manifest create \
356445
statusim/nimbus-validator-client:multiarch-latest \
357446
--amend statusim/nimbus-validator-client:amd64-latest \
358447
--amend statusim/nimbus-validator-client:arm64-latest \
448+
--amend statusim/nimbus-validator-client:arm-latest
359449
docker manifest push statusim/nimbus-validator-client:multiarch-latest

docker/dist/entry_point.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ if [[ "${PLATFORM}" == "Windows_amd64" ]]; then
7575
# nim-blscurve's Windows SSSE3 detection doesn't work when cross-compiling,
7676
# so we enable it here.
7777
make \
78-
-j$(nproc) \
7978
CC="${CC}" \
8079
CXX="${CXX}" \
8180
CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS -D_WIN32_WINNT=0x0600" \
@@ -94,7 +93,6 @@ elif [[ "${PLATFORM}" == "Linux_arm32v7" ]]; then
9493
QUICK_AND_DIRTY_COMPILER=1 \
9594
deps-common build/generate_makefile
9695
make \
97-
-j$(nproc) \
9896
LOG_LEVEL="TRACE" \
9997
CC="${CC}" \
10098
NIMFLAGS="${NIMFLAGS_COMMON} --cpu:arm --gcc.exe=${CC} --gcc.linkerexe=${CC}" \
@@ -111,7 +109,6 @@ elif [[ "${PLATFORM}" == "Linux_arm64v8" ]]; then
111109
QUICK_AND_DIRTY_COMPILER=1 \
112110
deps-common build/generate_makefile
113111
make \
114-
-j$(nproc) \
115112
LOG_LEVEL="TRACE" \
116113
CC="${CC}" \
117114
NIMFLAGS="${NIMFLAGS_COMMON} --cpu:arm64 --gcc.exe=${CC} --gcc.linkerexe=${CC}" \
@@ -139,7 +136,6 @@ elif [[ "${PLATFORM}" == "macOS_amd64" ]]; then
139136
NIMFLAGS="${NIMFLAGS_COMMON} --os:macosx --clang.exe=${CC}" \
140137
nat-libs
141138
make \
142-
-j$(nproc) \
143139
LOG_LEVEL="TRACE" \
144140
CC="${CC}" \
145141
AR="x86_64-apple-darwin${DARWIN_VER}-ar" \
@@ -172,7 +168,6 @@ elif [[ "${PLATFORM}" == "macOS_arm64" ]]; then
172168
NIMFLAGS="${NIMFLAGS_COMMON} --os:macosx --cpu:arm64 --passC:'-mcpu=apple-a13' --clang.exe=${CC}" \
173169
nat-libs
174170
make \
175-
-j$(nproc) \
176171
LOG_LEVEL="TRACE" \
177172
CC="${CC}" \
178173
AR="arm64-apple-darwin${DARWIN_VER}-ar" \
@@ -188,7 +183,6 @@ elif [[ "${PLATFORM}" == "Linux_amd64_opt" ]]; then
188183
echo
189184

190185
make \
191-
-j$(nproc) \
192186
LOG_LEVEL="TRACE" \
193187
NIMFLAGS="${NIMFLAGS_COMMON} -d:marchOptimized" \
194188
PARTIAL_STATIC_LINKING=1 \
@@ -200,7 +194,6 @@ else
200194
echo
201195

202196
make \
203-
-j$(nproc) \
204197
LOG_LEVEL="TRACE" \
205198
NIMFLAGS="${NIMFLAGS_COMMON}" \
206199
PARTIAL_STATIC_LINKING=1 \

0 commit comments

Comments
 (0)