mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Merge commit 'e5bed7ac380b6adb54b60a2a72a2a8f07f50d6c1' as 'bridges'
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
name: Cargo deny
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- diagrams/*
|
||||
- docs/*
|
||||
jobs:
|
||||
cargo-deny:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
checks:
|
||||
- advisories
|
||||
- bans licenses sources
|
||||
# Prevent sudden announcement of a new advisory from failing CI:
|
||||
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
- name: Cargo deny
|
||||
uses: EmbarkStudios/cargo-deny-action@v1
|
||||
with:
|
||||
command: check ${{ matrix.checks }}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
name: Check style
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- diagrams/*
|
||||
- docs/*
|
||||
schedule: # Weekly build
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
## Check stage
|
||||
check-fmt:
|
||||
name: Check RustFmt
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Add rustfmt
|
||||
run: rustup component add rustfmt
|
||||
|
||||
- name: rust-fmt check
|
||||
uses: actions-rs/cargo@master
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
@@ -0,0 +1,76 @@
|
||||
name: Publish Dependencies to Docker hub
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- diagrams/*
|
||||
- docs/*
|
||||
schedule: # Weekly build
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
## Publish to Docker hub
|
||||
publish:
|
||||
name: Publishing
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker:git
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=paritytech/bridge-dependencies
|
||||
VERSION=latest
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
elif [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
|
||||
fi
|
||||
TAGS=${DOCKER_IMAGE}:${VERSION}
|
||||
TAGS=$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}
|
||||
echo ::set-output name=TAGS::${TAGS}
|
||||
echo ::set-output name=DATE::$(date +%d-%m-%Y)
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: deployments/BridgeDeps.Dockerfile
|
||||
push: true
|
||||
cache-from: type=registry,ref=paritytech/bridge-dependencies:latest
|
||||
cache-to: type=inline
|
||||
tags: ${{ steps.prep.outputs.TAGS }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=bridge-dependencies
|
||||
org.opencontainers.image.description=bridge-dependencies - component of Parity Bridges Common
|
||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||
org.opencontainers.image.url=https://github.com/paritytech/parity-bridges-common
|
||||
org.opencontainers.image.documentation=https://github.com/paritytech/parity-bridges-common/README.md
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.DATE }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.authors=devops-team@parity.io
|
||||
org.opencontainers.image.vendor=Parity Technologies
|
||||
org.opencontainers.image.licenses=GPL-3.0 License
|
||||
@@ -0,0 +1,93 @@
|
||||
name: Publish images to Docker hub
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- diagrams/*
|
||||
- docs/*
|
||||
schedule: # Nightly build
|
||||
- cron: '0 1 * * *'
|
||||
|
||||
jobs:
|
||||
## Publish to Docker hub
|
||||
publish:
|
||||
name: Publishing
|
||||
strategy:
|
||||
matrix:
|
||||
project:
|
||||
- rialto-bridge-node
|
||||
- millau-bridge-node
|
||||
- ethereum-poa-relay
|
||||
- substrate-relay
|
||||
include:
|
||||
- project: rialto-bridge-node
|
||||
healthcheck: http://localhost:9933/health
|
||||
- project: millau-bridge-node
|
||||
healthcheck: http://localhost:9933/health
|
||||
- project: ethereum-poa-relay
|
||||
healthcheck: http://localhost:9616/metrics
|
||||
- project: substrate-relay
|
||||
healthcheck: http://localhost:9616/metrics
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
elif [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
|
||||
fi
|
||||
TAGS="${VERSION} sha-${GITHUB_SHA::8} latest"
|
||||
echo ::set-output name=TAGS::${VERSION}
|
||||
echo ::set-output name=TAGS::${TAGS}
|
||||
echo ::set-output name=DATE::$(date +%d-%m-%Y)
|
||||
|
||||
- name: Workaround rootless build
|
||||
run: |
|
||||
sudo apt-get install fuse-overlayfs
|
||||
mkdir -vp ~/.config/containers
|
||||
printf "[storage.options]\nmount_program=\"/usr/bin/fuse-overlayfs\"" > ~/.config/containers/storage.conf
|
||||
|
||||
- name: Build image for ${{ matrix.project }}
|
||||
uses: redhat-actions/buildah-build@v2.2
|
||||
with:
|
||||
image: ${{ matrix.project }}
|
||||
tags: ${{ steps.prep.outputs.TAGS }}
|
||||
dockerfiles: ./Dockerfile
|
||||
build-args: |
|
||||
PROJECT=${{ matrix.project }}
|
||||
HEALTH=${{ matrix.healthcheck }}
|
||||
VCS_REF=sha-${GITHUB_SHA::8}
|
||||
BUILD_DATE=${{ steps.prep.outputs.DATE }}
|
||||
VERSION=${{ steps.prep.outputs.VERSION }}
|
||||
|
||||
- name: Push ${{ matrix.project }} image to docker.io
|
||||
id: push-to-dockerhub
|
||||
uses: redhat-actions/push-to-registry@v2.1.1
|
||||
with:
|
||||
registry: docker.io/paritytech
|
||||
image: ${{ matrix.project }}
|
||||
tags: ${{ steps.prep.outputs.TAGS }}
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Check the image
|
||||
run: |
|
||||
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
name: Compilation and Testing Suite
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- diagrams/*
|
||||
- docs/*
|
||||
schedule: # Weekly build
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
|
||||
## Check Stage
|
||||
check-test:
|
||||
name: Check and test
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
#- beta
|
||||
- nightly-2021-04-10
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
NIGHTLY: nightly-2021-04-10 #if necessary, specify the version, nightly-2020-10-04, etc.
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Toolchain
|
||||
run: rustup toolchain add $NIGHTLY
|
||||
|
||||
- name: Add WASM Utilities
|
||||
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
|
||||
|
||||
- name: Checking rust-${{ matrix.toolchain }}
|
||||
uses: actions-rs/cargo@master
|
||||
with:
|
||||
command: check
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --all --verbose
|
||||
|
||||
## Test Stage
|
||||
- name: Testing rust-${{ matrix.toolchain }}
|
||||
uses: actions-rs/cargo@master
|
||||
if: matrix.toolchain == 'stable'
|
||||
with:
|
||||
command: test
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --all --verbose
|
||||
|
||||
## Check Node Benchmarks
|
||||
- name: Check Rialto benchmarks runtime ${{ matrix.platform }} rust-${{ matrix.toolchain }}
|
||||
uses: actions-rs/cargo@master
|
||||
with:
|
||||
command: check
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: -p rialto-runtime --features runtime-benchmarks --verbose
|
||||
|
||||
- name: Check Millau benchmarks runtime ${{ matrix.platform }} rust-${{ matrix.toolchain }}
|
||||
uses: actions-rs/cargo@master
|
||||
with:
|
||||
command: check
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: -p millau-runtime --features runtime-benchmarks --verbose
|
||||
|
||||
## Build Stage
|
||||
build:
|
||||
name: Build
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
#- beta
|
||||
- nightly
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
NIGHTLY: nightly-2021-04-10 #if necessary, specify the version, nightly-2020-10-04, etc.
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Toolchain
|
||||
run: rustup toolchain add $NIGHTLY
|
||||
|
||||
- name: Add WASM Utilities
|
||||
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
|
||||
|
||||
- name: Building rust-${{ matrix.toolchain }}
|
||||
uses: actions-rs/cargo@master
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
command: build
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --all --verbose
|
||||
|
||||
- name: Prepare artifacts
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
mkdir -p ./artifacts;
|
||||
mv -v target/debug/rialto-bridge-node ./artifacts/;
|
||||
mv -v target/debug/millau-bridge-node ./artifacts/;
|
||||
mv -v target/debug/ethereum-poa-relay ./artifacts/;
|
||||
mv -v target/debug/substrate-relay ./artifacts/;
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ${{ matrix.toolchain }}.zip
|
||||
path: artifacts/
|
||||
|
||||
## Linting Stage
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
NIGHTLY: nightly-2021-04-10 #if necessary, specify the version, nightly-2020-10-04, etc.
|
||||
steps:
|
||||
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.4.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout sources & submodules
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 5
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Toolchain
|
||||
run: rustup toolchain add $NIGHTLY
|
||||
|
||||
- name: Add WASM Utilities
|
||||
run: rustup target add wasm32-unknown-unknown --toolchain $NIGHTLY
|
||||
|
||||
- name: Add clippy
|
||||
run: rustup component add clippy --toolchain $NIGHTLY
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v1.2.0
|
||||
|
||||
- name: Clippy
|
||||
uses: actions-rs/cargo@master
|
||||
with:
|
||||
command: clippy
|
||||
toolchain: nightly-2021-04-10 #if necessary, specify the version, nightly-2020-10-04, etc.
|
||||
args: --all-targets -- -D warnings
|
||||
Reference in New Issue
Block a user