Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot-go_modules-develop-gopkg.in-Da…
Browse files Browse the repository at this point in the history
…taDog-dd-trace-go.v1-1.57.0
  • Loading branch information
Stefan-Ethernal authored Nov 9, 2023
2 parents be82323 + 1e7e3ed commit db0fd55
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 131 deletions.
Binary file removed .github/banner.jpg
Binary file not shown.
Binary file removed .github/banner.png
Binary file not shown.
40 changes: 20 additions & 20 deletions .github/workflows/ansible/update_edgenet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
-
name: Update Polygon Edge binary
name: Update Blade binary
hosts:
- all
become: yes
Expand All @@ -11,58 +11,58 @@
upgrade: yes
update_cache: yes

## stop polygon-edge service
- name: Stop polygon edge service
## stop blade service
- name: Stop Blade service
systemd:
state: stopped
name: polygon-edge
name: blade

## get the latest release
- name: Get latest release link
uri:
url: https://api.github.com/repos/0xPolygon/polygon-edge/releases/latest
url: https://api.github.com/repos/Ethernal-Tech/blade/releases/latest
return_content: true
register: edge_release

## download the latest release
- name: Download latest Polygon Edge release
- name: Download latest Blade release
get_url:
url: "{{ edge_release.json.assets[3].browser_download_url }}"
dest: /tmp/polygon-edge.tar.gz
dest: /tmp/blade.tar.gz
force: yes

## create temp dir for release
- name: Create temp dir for Polygon Edge release
- name: Create temp dir for Blade release
file:
path: /tmp/polygon-edge
path: /tmp/blade
state: directory

## unpack release tar
- name: Unpack Polygon Edge release
- name: Unpack Blade release
unarchive:
remote_src: yes
src: /tmp/polygon-edge.tar.gz
dest: /tmp/polygon-edge
src: /tmp/blade.tar.gz
dest: /tmp/blade

## set polygon-edge to PATH
- name: Place Polygon Edge binary to PATH
## set blade to PATH
- name: Place Blade binary to PATH
copy:
remote_src: yes
src: /tmp/polygon-edge/polygon-edge
src: /tmp/blade/blade
dest: /usr/local/bin/
mode: a+x
force: yes

## remove release temp dir
- name: Remove temp Polygon Edge release dir
- name: Remove temp Blade release dir
file:
state: absent
path: /tmp/polygon-edge
path: /tmp/blade

## start polygon edge service
- name: Start polygon-edge service
## start Blade service
- name: Start blade service
systemd:
state: restarted
name: polygon-edge
name: blade
daemon_reload: yes
enabled: yes
38 changes: 18 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
---
name: Build
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
workflow_dispatch:
workflow_call:
# Map the workflow outputs to job outputs
# Map the workflow outputs to job outputs
outputs:
workflow_output:
description: "Build output"
value: ${{ jobs.go_build.outputs.build_output_failure }}
value: ${{ jobs.go_build.outputs.build_output_failure }}

jobs:
go_build:
name: Polygon Edge
name: Blade
runs-on: ubuntu-latest
outputs:
build_output_failure: ${{ steps.edge_build_failure.outputs.build_output }}
build_output_failure: ${{ steps.blade_build_failure.outputs.build_output }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.20.x

- name: Build Polygon Edge
run: go build -tags netgo -ldflags="-s -w -linkmode external -extldflags "-static" -X \"github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/0xPolygon/polygon-edge/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf polygon-edge.tar.gz polygon-edge
- name: Build Blade
run: go build -o blade -tags netgo -ldflags="-s -w -X \"github.com/Ethernal-Tech/blade/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/Ethernal-Tech/blade/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf blade.tar.gz blade
env:
CC: gcc
CXX: g++
GOARC: amd64
GOOS: linux

- name: Build Polygon Edge Failed
- name: Build Blade Failed
if: failure()
id: edge_build_failure
id: blade_build_failure
run: echo "build_output=false" >> $GITHUB_OUTPUT

- name: 'Upload Artifact'
- name: "Upload Artifact"
uses: actions/upload-artifact@v3
with:
name: polygon-edge
path: polygon-edge.tar.gz
name: blade
path: blade.tar.gz
retention-days: 3

go_build_reproducibility:
Expand All @@ -57,14 +55,14 @@ jobs:
with:
go-version: 1.20.x

- name: 'Reproduce builds'
- name: Reproduce builds
continue-on-error: true
run: |
go build -o ./edge-1 -trimpath -buildvcs=false
go build -o ./edge-2 -trimpath -buildvcs=false
go build -o ./blade-1 -trimpath -buildvcs=false
go build -o ./blade-2 -trimpath -buildvcs=false
buildsha1=$(shasum -a256 ./edge-1 | awk '{print $1}')
buildsha2=$(shasum -a256 ./edge-2 | awk '{print $1}')
buildsha1=$(shasum -a256 ./blade-1 | awk '{print $1}')
buildsha2=$(shasum -a256 ./blade-2 | awk '{print $1}')
echo "Build 1 SHA: $buildsha1"
echo "Build 2 SHA: $buildsha2"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Pull Request CI
name: CI
on: # yamllint disable-line rule:truthy
workflow_dispatch: {}
pull_request:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
---
name: "CLA Assistant"
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
issue_comment:
types:
- created
pull_request_target:
types:
- opened
- closed
- synchronize

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
- name: "Check CLA"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/[email protected]
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'cla.json'
path-to-document: 'https://github.com/0xPolygon/polygon-edge/blob/develop/CLA.md'
branch: 'cla-signatures'
path-to-signatures: "cla.json"
path-to-document: "https://github.com/Ethernal-Tech/blade/blob/develop/CLA.md"
branch: "cla-signatures"
allowlist: dependabot[bot],dependabot-preview[bot]
10 changes: 5 additions & 5 deletions .github/workflows/deploy.devnet.eph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
url: https://rpc.us-east-1.deph.testing.psdk.io/
runs-on: ubuntu-latest
steps:
- name: Download Polygon Edge Artifact
- name: Download Blade Artifact
uses: actions/download-artifact@v3
with:
name: polygon-edge
name: blade

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Publish Binary package to S3
run: |
aws s3 cp ./polygon-edge.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}"
aws s3 cp ./blade.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}"
- name: Deploy Ephemeral DevNet
continue-on-error: true
Expand All @@ -86,8 +86,8 @@ jobs:
echo "--------------------"
# Should finish relatively fast. Can add a check to guard against pre-mature cycle
echo "Cleaning up the data directories and stopping Polygon-Edge service..."
aws ssm send-command --document-name polygon-edge-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null
echo "Cleaning up the data directories and stopping blade service..."
aws ssm send-command --document-name blade-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null
for vasg in ${VALIDATOR_ASGS//,/ }
do
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
url: https://rpc.us-east-1.testing.psdk.io/
runs-on: ubuntu-latest
steps:
- name: Download Polygon Edge Artifact
- name: Download Blade Artifact
uses: actions/download-artifact@v3
with:
name: polygon-edge
name: blade

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Publish Binary package to S3
run: |
aws s3 cp ./polygon-edge.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}"
aws s3 cp ./blade.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}"
- name: Deploy DevNet
continue-on-error: true
Expand All @@ -86,8 +86,8 @@ jobs:
echo "--------------------"
# Should finish relatively fast. Can add a check to guard against pre-mature cycle
echo "Cleaning up the data directories and stopping Polygon-Edge Devnet service..."
aws ssm send-command --document-name polygon-edge-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null
echo "Cleaning up the data directories and stopping Blade Devnet service..."
aws ssm send-command --document-name blade-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null
for vasg in ${VALIDATOR_ASGS//,/ }
do
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
url: https://rpc.us-east-1.tn.testing.psdk.io/
runs-on: ubuntu-latest
steps:
- name: Download Polygon Edge Artifact
- name: Download Blade Artifact
uses: actions/download-artifact@v3
with:
name: polygon-edge
name: blade

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/deploy_edgenet.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/fuzz-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy

jobs:
fuzz_test:
name: Polygon Edge
name: Blade
runs-on: ubuntu-latest
outputs:
fuzz_output_failure: ${{ steps.run_fuzz_failure.outputs.test_output }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Lint
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches:
- '*'
- "*"
tags-ignore:
- 'v*'
- "v*"
paths:
- '**.go'
- "**.go"
pull_request:
types:
- opened
Expand All @@ -19,6 +19,7 @@ on: # yamllint disable-line rule:truthy

jobs:
golangci_lint:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate
env:
PACKAGE_NAME: github.com/0xPolygon/polygon-edge
PACKAGE_NAME: github.com/Ethernal-Tech/blade
GOLANG_CROSS_VERSION: v1.20.5
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy

jobs:
go_test:
name: Polygon Edge
name: Blade
runs-on: ubuntu-latest
outputs:
test_output_failure: ${{ steps.run_tests_failure.outputs.test_output }}
Expand Down
Loading

0 comments on commit db0fd55

Please sign in to comment.