Skip to content

Commit 9adec02

Browse files
Merge pull request ethereum#1369 from maticnetwork/master
Backport master to develop (v1.5.2)
2 parents 63460bd + 16268f6 commit 9adec02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2469
-1497
lines changed

.github/workflows/amoy_deb_profiles.yml

Lines changed: 387 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/mainnet_deb_profiles.yml

Lines changed: 405 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/packager.yml

Lines changed: 0 additions & 1372 deletions
This file was deleted.

.github/workflows/packager_deb.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: packager_deb
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
paths:
8+
- '**'
9+
tags:
10+
- 'v*.*.*'
11+
- 'v*.*.*-*'
12+
13+
jobs:
14+
build:
15+
permissions:
16+
id-token: write
17+
contents: write
18+
runs-on: ubuntu-20.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- name: Set up Go
25+
uses: actions/setup-go@master
26+
with:
27+
go-version: 1.22.1
28+
# Variables
29+
- name: Adding TAG to ENV
30+
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
31+
- name: adding version
32+
run: |
33+
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
34+
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
35+
36+
- name: Cleaning repo
37+
run: make clean
38+
- name: Building for amd64
39+
run: make bor
40+
41+
- name: Making directory structure
42+
run: mkdir -p packaging/deb/bor/usr/bin
43+
- name: Copying necessary files
44+
run: cp -rp build/bin/bor packaging/deb/bor/usr/bin/
45+
- name: Delete control file
46+
run: rm -rf packaging/deb/bor/DEBIAN/control
47+
48+
# Control file creation
49+
- name: create control file
50+
run: |
51+
touch packaging/deb/bor/DEBIAN/control
52+
echo "Package: bor" >> packaging/deb/bor/DEBIAN/control
53+
echo "Version: ${{ env.VERSION }}" >> packaging/deb/bor/DEBIAN/control
54+
echo "Section: base" >> packaging/deb/bor/DEBIAN/control
55+
echo "Priority: optional" >> packaging/deb/bor/DEBIAN/control
56+
echo "Architecture: amd64" >> packaging/deb/bor/DEBIAN/control
57+
echo "Maintainer: [email protected]" >> packaging/deb/bor/DEBIAN/control
58+
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control
59+
60+
- name: Creating package for binary for bor ${{ env.ARCH }}
61+
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
62+
env:
63+
ARCH: amd64
64+
65+
- name: Running package build
66+
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
67+
env:
68+
ARCH: amd64
69+
70+
- name: Cleaning build directory for arm64 build
71+
run: make clean
72+
73+
- name: Updating the apt-get
74+
run: sudo apt-get update -y
75+
76+
- name: Adding requirements for cross compile
77+
run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
78+
79+
- name: delete amd64 control file
80+
run: rm -rf packaging/deb/bor/DEBIAN/control
81+
82+
- name: Building bor for arm64
83+
run: GOARCH=arm64 GOOS=linux CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ CGO_ENABLED=1 go build -o build/bin/bor ./cmd/cli/main.go
84+
85+
# Control file for arm64 creation
86+
- name: create control file
87+
run: |
88+
touch packaging/deb/bor/DEBIAN/control
89+
echo "Package: bor" >> packaging/deb/bor/DEBIAN/control
90+
echo "Version: ${{ env.VERSION }}" >> packaging/deb/bor/DEBIAN/control
91+
echo "Section: base" >> packaging/deb/bor/DEBIAN/control
92+
echo "Priority: optional" >> packaging/deb/bor/DEBIAN/control
93+
echo "Architecture: arm64" >> packaging/deb/bor/DEBIAN/control
94+
echo "Maintainer: [email protected]" >> packaging/deb/bor/DEBIAN/control
95+
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control
96+
97+
98+
- name: Creating package for binary for bor ${{ env.ARCH }}
99+
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
100+
env:
101+
ARCH: arm64
102+
103+
- name: Running package build
104+
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
105+
env:
106+
ARCH: arm64
107+
108+
# Shasum
109+
- name: shasum the bor debian package
110+
run: cd packaging/deb/ && sha256sum bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
111+
env:
112+
ARCH: amd64
113+
114+
- name: shasum the bor debian package
115+
run: cd packaging/deb/ && sha256sum bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
116+
env:
117+
ARCH: arm64
118+
119+
- name: Release bor Packages
120+
uses: softprops/action-gh-release@v2
121+
with:
122+
tag_name: ${{ env.GIT_TAG }}
123+
prerelease: true
124+
files: |
125+
packaging/deb/bor**.deb
126+
packaging/deb/bor**.deb.checksum

0 commit comments

Comments
 (0)