Skip to content

Commit

Permalink
tracers ci: drop duktape engine (ethereum#24934) and add linux-arm bi…
Browse files Browse the repository at this point in the history
…naries to releases page (ethereum#1100)
  • Loading branch information
j75689 authored Sep 26, 2022
1 parent 781e567 commit 816e301
Show file tree
Hide file tree
Showing 29 changed files with 1,745 additions and 1,086 deletions.
10 changes: 9 additions & 1 deletion .github/generate_change_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ TESTNET_ZIP_SUM="$(checksum ./testnet.zip)"
LINUX_BIN_SUM="$(checksum ./linux/geth)"
MAC_BIN_SUM="$(checksum ./macos/geth)"
WINDOWS_BIN_SUM="$(checksum ./windows/geth.exe)"
ARM5_BIN_SUM="$(checksum ./arm5/geth-linux-arm-5)"
ARM6_BIN_SUM="$(checksum ./arm6/geth-linux-arm-6)"
ARM7_BIN_SUM="$(checksum ./arm7/geth-linux-arm-7)"
ARM64_BIN_SUM="$(checksum ./arm64/geth-linux-arm64)"
OUTPUT=$(cat <<-END
## Changelog\n
${CHANGE_LOG}\n
Expand All @@ -35,7 +39,11 @@ ${CHANGE_LOG}\n
| geth_linux | ${LINUX_BIN_SUM} |\n
| geth_mac | ${MAC_BIN_SUM} |\n
| geth_windows | ${WINDOWS_BIN_SUM} |\n
| geth_linux_arm-5 | ${ARM5_BIN_SUM} |\n
| geth_linux_arm-6 | ${ARM6_BIN_SUM} |\n
| geth_linux_arm-7 | ${ARM7_BIN_SUM} |\n
| geth_linux_arm64 | ${ARM64_BIN_SUM} |\n
END
)

echo -e ${OUTPUT}
echo -e ${OUTPUT}
108 changes: 105 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# ==============================
# Linux/Macos/Windows Build
# ==============================
Expand All @@ -46,6 +45,18 @@ jobs:
run: make geth

# ==============================
# Cross Compile for ARM
# ==============================

- name: Build Binary for ARM
if: matrix.os == 'ubuntu-18.04'
env:
GOPATH: /home/runner/work/woodpecker/go
run: |
mkdir -p $GOPATH/src/github.com/bnb-chain/bsc/
cp -r ./* $GOPATH/src/github.com/bnb-chain/bsc/
cd $GOPATH/src/github.com/bnb-chain/bsc/ && make geth-linux-arm
# ==============================
# Upload artifacts
# ==============================

Expand All @@ -70,6 +81,34 @@ jobs:
name: windows
path: ./build/bin/geth.exe

- name: Upload ARM-5 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm5
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm6
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-6

- name: Upload ARM-7 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm7
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-7

- name: Upload ARM-64 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm64
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm64

release:
name: Release
needs: build
Expand Down Expand Up @@ -102,6 +141,30 @@ jobs:
with:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
Expand All @@ -110,7 +173,6 @@ jobs:
echo "testnet.zip url: $TESTNET_FILE_URL"
curl -L $MAINNET_FILE_URL -o ./mainnet.zip
curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================
Expand Down Expand Up @@ -161,6 +223,46 @@ jobs:
asset_path: ./windows/geth.exe
asset_name: geth_windows.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm5/geth-linux-arm-5
asset_name: geth-linux-arm-5
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm6/geth-linux-arm-6
asset_name: geth-linux-arm-6
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm7/geth-linux-arm-7
asset_name: geth-linux-arm-7
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm64/geth-linux-arm64
asset_name: geth-linux-arm64
asset_content_type: application/octet-stream

- name: Upload Release Asset - MAINNET.ZIP
uses: actions/upload-release-asset@v1
Expand All @@ -180,4 +282,4 @@ jobs:
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
asset_path: ./testnet.zip
asset_name: testnet.zip
asset_content_type: application/zip
asset_content_type: application/zip
110 changes: 105 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# ==============================
# Linux/Macos/Windows Build
# ==============================
Expand All @@ -47,6 +46,18 @@ jobs:
run: make geth

# ==============================
# Cross Compile for ARM
# ==============================

- name: Build Binary for ARM
if: matrix.os == 'ubuntu-18.04'
env:
GOPATH: /home/runner/work/woodpecker/go
run: |
mkdir -p $GOPATH/src/github.com/bnb-chain/bsc/
cp -r ./* $GOPATH/src/github.com/bnb-chain/bsc/
cd $GOPATH/src/github.com/bnb-chain/bsc/ && make geth-linux-arm
# ==============================
# Upload artifacts
# ==============================

Expand All @@ -71,6 +82,34 @@ jobs:
name: windows
path: ./build/bin/geth.exe

- name: Upload ARM-5 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm5
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm6
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-6

- name: Upload ARM-7 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm7
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm-7

- name: Upload ARM-64 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm64
path: /home/runner/work/woodpecker/go/src/github.com/bnb-chain/bsc/build/bin/geth-linux-arm64

release:
name: Release
needs: build
Expand Down Expand Up @@ -104,14 +143,37 @@ jobs:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
. ./.github/release.env
echo "mainnet.zip url: $MAINNET_FILE_URL"
echo "testnet.zip url: $TESTNET_FILE_URL"
curl -L $MAINNET_FILE_URL -o ./mainnet.zip
curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================
Expand All @@ -120,11 +182,9 @@ jobs:
run: |
chmod 755 ./.github/generate_change_log.sh
CHANGELOG=$(./.github/generate_change_log.sh ${{ env.RELEASE_VERSION}})
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@latest
Expand Down Expand Up @@ -171,6 +231,46 @@ jobs:
asset_name: geth_windows.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm5/geth-linux-arm-5
asset_name: geth-linux-arm-5
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm6/geth-linux-arm-6
asset_name: geth-linux-arm-6
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm7/geth-linux-arm-7
asset_name: geth-linux-arm-7
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./arm64/geth-linux-arm64
asset_name: geth-linux-arm64
asset_content_type: application/octet-stream

- name: Upload Release Asset - MAINNET.ZIP
uses: actions/upload-release-asset@v1
env:
Expand All @@ -189,4 +289,4 @@ jobs:
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
asset_path: ./testnet.zip
asset_name: testnet.zip
asset_content_type: application/zip
asset_content_type: application/zip
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ ENV BSC_HOME=/bsc
ENV HOME=${BSC_HOME}
ENV DATA_DIR=/data

ENV PACKAGES ca-certificates~=20220614 jq~=1.6 \
bash~=5.1.16-r2 bind-tools~=9.16.29-r0 tini~=0.19.0 \
grep~=3.7 curl~=7.83.1-r2 sed~=4.8-r0 curl~=7.83
ENV PACKAGES ca-certificates~=20220614-r0 jq~=1.6 \
bash~=5.1.16-r2 bind-tools~=9.16.33-r0 tini~=0.19.0 \
grep~=3.7 curl=~7.83.1-r3 sed~=4.8-r0

RUN apk add --no-cache $PACKAGES \
&& rm -rf /var/cache/apk/* \
Expand Down
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.

.PHONY: geth android ios geth-cross evm all test truffle-test clean
.PHONY: geth android ios evm all test truffle-test clean
.PHONY: docker
.PHONY: geth-linux-arm geth-linux-arm64 geth-linux-arm5 geth-linux-arm6 geth-linux-arm7

GOBIN = ./build/bin
GO ?= latest
Expand All @@ -14,6 +15,20 @@ geth:
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."

geth-linux-arm: geth-linux-arm5 geth-linux-arm6 geth-linux-arm7 geth-linux-arm64

geth-linux-arm5:
env GO111MODULE=on GOARCH=arm GOARM=5 GOOS=linux go build -o build/bin/geth-linux-arm-5 ./cmd/geth

geth-linux-arm6:
env GO111MODULE=on GOARCH=arm GOARM=6 GOOS=linux go build -o build/bin/geth-linux-arm-6 ./cmd/geth

geth-linux-arm7:
env GO111MODULE=on GOARCH=arm GOARM=7 GOOS=linux go build -o build/bin/geth-linux-arm-7 ./cmd/geth

geth-linux-arm64:
env GO111MODULE=on GOARCH=arm64 GOOS=linux go build -o build/bin/geth-linux-arm64 ./cmd/geth

all:
$(GORUN) build/ci.go install

Expand Down
Loading

0 comments on commit 816e301

Please sign in to comment.