Skip to content

Commit 43d0adb

Browse files
committed
ci: add arm binaries for release pipeline (bnb-chain#713)
1 parent 9104d27 commit 43d0adb

File tree

3 files changed

+218
-0
lines changed

3 files changed

+218
-0
lines changed

.github/generate_change_log.sh

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ TESTNET_ZIP_SUM="$(checksum ./testnet.zip)"
2424
LINUX_BIN_SUM="$(checksum ./linux/geth)"
2525
MAC_BIN_SUM="$(checksum ./macos/geth)"
2626
WINDOWS_BIN_SUM="$(checksum ./windows/geth.exe)"
27+
ARM5_BIN_SUM="$(checksum ./arm5/geth-linux-arm-5)"
28+
ARM6_BIN_SUM="$(checksum ./arm6/geth-linux-arm-6)"
29+
ARM7_BIN_SUM="$(checksum ./arm7/geth-linux-arm-7)"
30+
ARM64_BIN_SUM="$(checksum ./arm64/geth-linux-arm64)"
2731
OUTPUT=$(cat <<-END
2832
## Changelog\n
2933
${CHANGE_LOG}\n
@@ -35,6 +39,10 @@ ${CHANGE_LOG}\n
3539
| geth_linux | ${LINUX_BIN_SUM} |\n
3640
| geth_mac | ${MAC_BIN_SUM} |\n
3741
| geth_windows | ${WINDOWS_BIN_SUM} |\n
42+
| geth_linux_arm5 | ${ARM5_BIN_SUM} |\n
43+
| geth_linux_arm6 | ${ARM6_BIN_SUM} |\n
44+
| geth_linux_arm7 | ${ARM7_BIN_SUM} |\n
45+
| geth_linux_arm64 | ${ARM64_BIN_SUM} |\n
3846
END
3947
)
4048

.github/workflows/pre-release.yml

+105
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ jobs:
4545
- name: Build Binary for ${{matrix.os}}
4646
run: make geth
4747

48+
# ==============================
49+
# Cross Compile for ARM
50+
# ==============================
51+
52+
- name: Build Binary for ARM
53+
if: matrix.os == 'ubuntu-18.04'
54+
env:
55+
GOPATH: /home/runner/work/woodpecker/go
56+
run: |
57+
mkdir -p $GOPATH/src/github.com/binance-chain/bsc/
58+
cp -r ./* $GOPATH/src/github.com/binance-chain/bsc/
59+
cd $GOPATH/src/github.com/binance-chain/bsc/ && make geth-linux-arm
60+
4861
# ==============================
4962
# Upload artifacts
5063
# ==============================
@@ -70,6 +83,34 @@ jobs:
7083
name: windows
7184
path: ./build/bin/geth.exe
7285

86+
- name: Upload ARM-5 Build
87+
uses: actions/upload-artifact@v2
88+
if: matrix.os == 'ubuntu-18.04'
89+
with:
90+
name: arm5
91+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-5
92+
93+
- name: Upload ARM-6 Build
94+
uses: actions/upload-artifact@v2
95+
if: matrix.os == 'ubuntu-18.04'
96+
with:
97+
name: arm6
98+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-6
99+
100+
- name: Upload ARM-7 Build
101+
uses: actions/upload-artifact@v2
102+
if: matrix.os == 'ubuntu-18.04'
103+
with:
104+
name: arm7
105+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-7
106+
107+
- name: Upload ARM-64 Build
108+
uses: actions/upload-artifact@v2
109+
if: matrix.os == 'ubuntu-18.04'
110+
with:
111+
name: arm64
112+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm64
113+
73114
release:
74115
name: Release
75116
needs: build
@@ -102,6 +143,30 @@ jobs:
102143
with:
103144
name: windows
104145
path: ./windows
146+
147+
- name: Download Artifacts
148+
uses: actions/download-artifact@v2
149+
with:
150+
name: arm5
151+
path: ./arm5
152+
153+
- name: Download Artifacts
154+
uses: actions/download-artifact@v2
155+
with:
156+
name: arm6
157+
path: ./arm6
158+
159+
- name: Download Artifacts
160+
uses: actions/download-artifact@v2
161+
with:
162+
name: arm7
163+
path: ./arm7
164+
165+
- name: Download Artifacts
166+
uses: actions/download-artifact@v2
167+
with:
168+
name: arm64
169+
path: ./arm64
105170

106171
- name: Download Config File
107172
run: |
@@ -161,6 +226,46 @@ jobs:
161226
asset_path: ./windows/geth.exe
162227
asset_name: geth_windows.exe
163228
asset_content_type: application/octet-stream
229+
230+
- name: Upload Release Asset - Linux ARM 5
231+
uses: actions/upload-release-asset@v1
232+
env:
233+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234+
with:
235+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
236+
asset_path: ./arm5/geth-linux-arm-5
237+
asset_name: geth-linux-arm-5
238+
asset_content_type: application/octet-stream
239+
240+
- name: Upload Release Asset - Linux ARM 6
241+
uses: actions/upload-release-asset@v1
242+
env:
243+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
244+
with:
245+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
246+
asset_path: ./arm6/geth-linux-arm-6
247+
asset_name: geth-linux-arm-6
248+
asset_content_type: application/octet-stream
249+
250+
- name: Upload Release Asset - Linux ARM 7
251+
uses: actions/upload-release-asset@v1
252+
env:
253+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
254+
with:
255+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
256+
asset_path: ./arm7/geth-linux-arm-7
257+
asset_name: geth-linux-arm-7
258+
asset_content_type: application/octet-stream
259+
260+
- name: Upload Release Asset - Linux ARM 64
261+
uses: actions/upload-release-asset@v1
262+
env:
263+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
264+
with:
265+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
266+
asset_path: ./arm64/geth-linux-arm64
267+
asset_name: geth-linux-arm64
268+
asset_content_type: application/octet-stream
164269

165270
- name: Upload Release Asset - MAINNET.ZIP
166271
uses: actions/upload-release-asset@v1

.github/workflows/release.yml

+105
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ jobs:
4646
- name: Build Binary for ${{matrix.os}}
4747
run: make geth
4848

49+
# ==============================
50+
# Cross Compile for ARM
51+
# ==============================
52+
53+
- name: Build Binary for ARM
54+
if: matrix.os == 'ubuntu-18.04'
55+
env:
56+
GOPATH: /home/runner/work/woodpecker/go
57+
run: |
58+
mkdir -p $GOPATH/src/github.com/binance-chain/bsc/
59+
cp -r ./* $GOPATH/src/github.com/binance-chain/bsc/
60+
cd $GOPATH/src/github.com/binance-chain/bsc/ && make geth-linux-arm
61+
4962
# ==============================
5063
# Upload artifacts
5164
# ==============================
@@ -71,6 +84,34 @@ jobs:
7184
name: windows
7285
path: ./build/bin/geth.exe
7386

87+
- name: Upload ARM-5 Build
88+
uses: actions/upload-artifact@v2
89+
if: matrix.os == 'ubuntu-18.04'
90+
with:
91+
name: arm5
92+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-5
93+
94+
- name: Upload ARM-6 Build
95+
uses: actions/upload-artifact@v2
96+
if: matrix.os == 'ubuntu-18.04'
97+
with:
98+
name: arm6
99+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-6
100+
101+
- name: Upload ARM-7 Build
102+
uses: actions/upload-artifact@v2
103+
if: matrix.os == 'ubuntu-18.04'
104+
with:
105+
name: arm7
106+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-7
107+
108+
- name: Upload ARM-64 Build
109+
uses: actions/upload-artifact@v2
110+
if: matrix.os == 'ubuntu-18.04'
111+
with:
112+
name: arm64
113+
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm64
114+
74115
release:
75116
name: Release
76117
needs: build
@@ -104,6 +145,30 @@ jobs:
104145
name: windows
105146
path: ./windows
106147

148+
- name: Download Artifacts
149+
uses: actions/download-artifact@v2
150+
with:
151+
name: arm5
152+
path: ./arm5
153+
154+
- name: Download Artifacts
155+
uses: actions/download-artifact@v2
156+
with:
157+
name: arm6
158+
path: ./arm6
159+
160+
- name: Download Artifacts
161+
uses: actions/download-artifact@v2
162+
with:
163+
name: arm7
164+
path: ./arm7
165+
166+
- name: Download Artifacts
167+
uses: actions/download-artifact@v2
168+
with:
169+
name: arm64
170+
path: ./arm64
171+
107172
- name: Download Config File
108173
run: |
109174
. ./.github/release.env
@@ -171,6 +236,46 @@ jobs:
171236
asset_name: geth_windows.exe
172237
asset_content_type: application/octet-stream
173238

239+
- name: Upload Release Asset - Linux ARM 5
240+
uses: actions/upload-release-asset@v1
241+
env:
242+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
243+
with:
244+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
245+
asset_path: ./arm5/geth-linux-arm-5
246+
asset_name: geth-linux-arm-5
247+
asset_content_type: application/octet-stream
248+
249+
- name: Upload Release Asset - Linux ARM 6
250+
uses: actions/upload-release-asset@v1
251+
env:
252+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
253+
with:
254+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
255+
asset_path: ./arm6/geth-linux-arm-6
256+
asset_name: geth-linux-arm-6
257+
asset_content_type: application/octet-stream
258+
259+
- name: Upload Release Asset - Linux ARM 7
260+
uses: actions/upload-release-asset@v1
261+
env:
262+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
263+
with:
264+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
265+
asset_path: ./arm7/geth-linux-arm-7
266+
asset_name: geth-linux-arm-7
267+
asset_content_type: application/octet-stream
268+
269+
- name: Upload Release Asset - Linux ARM 64
270+
uses: actions/upload-release-asset@v1
271+
env:
272+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
273+
with:
274+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
275+
asset_path: ./arm64/geth-linux-arm64
276+
asset_name: geth-linux-arm64
277+
asset_content_type: application/octet-stream
278+
174279
- name: Upload Release Asset - MAINNET.ZIP
175280
uses: actions/upload-release-asset@v1
176281
env:

0 commit comments

Comments
 (0)