-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into skunert/overhead-benchmark-again
- Loading branch information
Showing
8 changed files
with
191 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build and push ETH-RPC image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
IMAGE_NAME: "docker.io/paritypr/eth-rpc" | ||
|
||
jobs: | ||
set-variables: | ||
# This workaround sets the container image for each job using 'set-variables' job output. | ||
# env variables don't work for PR from forks, so we need to use outputs. | ||
runs-on: ubuntu-latest | ||
outputs: | ||
VERSION: ${{ steps.version.outputs.VERSION }} | ||
steps: | ||
- name: Define version | ||
id: version | ||
run: | | ||
export COMMIT_SHA=${{ github.sha }} | ||
export COMMIT_SHA_SHORT=${COMMIT_SHA:0:8} | ||
export REF_NAME=${{ github.ref_name }} | ||
export REF_SLUG=${REF_NAME//\//_} | ||
VERSION=${REF_SLUG}-${COMMIT_SHA_SHORT} | ||
echo "VERSION=${REF_SLUG}-${COMMIT_SHA_SHORT}" >> $GITHUB_OUTPUT | ||
echo "set VERSION=${VERSION}" | ||
build_docker: | ||
name: Build docker image | ||
runs-on: parity-large | ||
needs: [set-variables] | ||
env: | ||
VERSION: ${{ needs.set-variables.outputs.VERSION }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./substrate/frame/revive/rpc/Dockerfile | ||
push: false | ||
tags: | | ||
${{ env.IMAGE_NAME }}:${{ env.VERSION }} | ||
build_push_docker: | ||
name: Build and push docker image | ||
runs-on: parity-large | ||
if: github.ref == 'refs/heads/master' | ||
needs: [set-variables] | ||
env: | ||
VERSION: ${{ needs.set-variables.outputs.VERSION }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.PARITYPR_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.PARITYPR_DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./substrate/frame/revive/rpc/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
title: Bump a timeout in zombienet coretime smoke test | ||
doc: | ||
- audience: Node Dev | ||
description: |- | ||
polkadot/zombienet_tests/smoke/0004-coretime-smoke-test.zndsl still timeouts on CI from time to time. Bumping the timeout a bit more. | ||
|
||
Related to https://github.com/paritytech/polkadot-sdk/issues/6226 | ||
crates: | ||
- name: polkadot | ||
bump: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
title: '[pallet-revive] rpc server add docker file' | ||
doc: | ||
- audience: Runtime Dev | ||
description: |- | ||
Add a docker for pallet-revive eth-rpc | ||
|
||
Tested with | ||
``` | ||
sudo docker build . -t eth-rpc -f substrate/frame/revive/rpc/Dockerfile | ||
sudo docker run --network="host" -e RUST_LOG="info,eth-rpc=debug" eth-rpc | ||
``` | ||
crates: | ||
- name: pallet-revive-eth-rpc | ||
bump: minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
doc | ||
**target* | ||
.idea/ | ||
Dockerfile | ||
.dockerignore | ||
.local | ||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM rust AS builder | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
protobuf-compiler | ||
|
||
WORKDIR /polkadot | ||
COPY . /polkadot | ||
RUN cargo build --locked --profile production -p pallet-revive-eth-rpc --bin eth-rpc | ||
|
||
FROM docker.io/parity/base-bin:latest | ||
COPY --from=builder /polkadot/target/production/eth-rpc /usr/local/bin | ||
|
||
USER root | ||
RUN useradd -m -u 1001 -U -s /bin/sh -d /polkadot polkadot && \ | ||
# unclutter and minimize the attack surface | ||
rm -rf /usr/bin /usr/sbin && \ | ||
# check if executable works in this container | ||
/usr/local/bin/eth-rpc --help | ||
|
||
USER polkadot | ||
EXPOSE 8545 | ||
ENTRYPOINT ["/usr/local/bin/eth-rpc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters