Skip to content

Commit

Permalink
Added bootstrap to push workflow.
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr <a-p-petrosyan@yandex.ru>
  • Loading branch information
appetrosyan committed Dec 3, 2021
1 parent bc9851e commit 2a2791e
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-pr-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
check:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
container:
image: 7272721/i2-ci:latest
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
lscpu
free -h
- name: Format check
run: cargo +nightly-2021-10-22 fmt --all -- --check
run: cargo +nightly-2021-12-02 fmt --all -- --check
- name: Static analysis without features
run: cargo lints clippy --workspace --benches --tests --quiet
if: always()
Expand Down
70 changes: 58 additions & 12 deletions .github/workflows/iroha2-dev-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,87 @@ on:
jobs:
check_pr_title:
runs-on: ubuntu-latest
# TODO: Add labels when https://github.com/actions/first-interaction/issues/10 is fixed.
steps:
- uses: actions-ecosystem/action-regex-match@v2
- name: Feature
uses: actions-ecosystem/action-regex-match@v2
id: feature-match
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[(feature|feat\.?)\] \#?([[:digit:]]+|\(([[:digit:]]+,?\s?)+\)):.+$'
regex: '^\[feature\] #\d+(, #\d+)*: .+$'
# - name: Add feature label
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ steps.feature-match.outputs.match != '' }}
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Enhancement

- uses: actions-ecosystem/action-regex-match@v2
- name: Refactor
uses: actions-ecosystem/action-regex-match@v2
id: refactor-match
if: ${{ steps.feature-match.outputs.match == '' }}
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[ref(actor)?\]( \#?([[:digit:]]+|\(([[:digit:]]+,?\s?)+\)):)?.+$'
regex: '^\[refactor\]( #\d+(, #\d+)*)?: .+$'
# - name: Add Refactor label
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ steps.refactor-match.outputs.match != '' }}
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Refactor

- uses: actions-ecosystem/action-regex-match@v2
- name: Fix
uses: actions-ecosystem/action-regex-match@v2
id: fix-match
if: ${{ steps.refactor-match.outputs.match == '' }}
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[(bug)?fix(up)?\] \#?([[:digit:]]+|\(([[:digit:]]+,?\s?)+\)):.+$'
regex: '\[fix\] #\d+(, #\d+)*: .+$'
# - name: Add fix label
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ steps.fix-match.outputs.match != '' }}
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Bug

- uses: actions-ecosystem/action-regex-match@v2
- name: Documentation
uses: actions-ecosystem/action-regex-match@v2
id: docs-match
if: ${{ steps.feature-match.outputs.match == '' }}
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[doc(s|umentation)?\]( \#?([[:digit:]]+|\(([[:digit:]]+,?\s?)+\)):)?.+$'
regex: '^\[documentation\]( #\d+(, #\d+)*)?: .+$'
# - name: Add Documentation label
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ steps.docs-match.outputs.match != '' }}
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Documentation

- uses: actions-ecosystem/action-regex-match@v2
- name: CI
uses: actions-ecosystem/action-regex-match@v2
id: ci-match
if: ${{ steps.feature-match.outputs.match == '' }}
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[ci\]( \#?([[:digit:]]+|\(([[:digit:]]+,?\s?)+\)):)?.+$'
regex: '^\[ci\]( #\d+(, #\d+)*)?: .+$'
# - name: Add CI label
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ steps.ci-match.outputs.match != '' }}
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# CI

- name: Failure
if: ${{ steps.fix-match.outputs.match == '' && steps.refactor-match.outputs.match == '' && steps.feature-match.outputs.match == '' }}
- name: None of the above
if: ${{ steps.fix-match.outputs.match == '' && steps.refactor-match.outputs.match == '' && steps.feature-match.outputs.match == '' && steps.docs-match.outputs.match == '' && steps.ci-match.outputs.match == '' }}
run: exit 1
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-pr-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:

jobs:
test:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
container:
image: 7272721/i2-ci:latest
timeout-minutes: 60
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:

jobs:
test:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
container:
image: 7272721/i2-ci:latest
timeout-minutes: 60
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
# 1. PR can get coverage report from bot.
# 2 Coverage bot can have results from `iroha2-dev` to report coverage changes.
coverage:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
container:
image: 7272721/i2-ci:latest
steps:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/iroha2-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

jobs:
deploy:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
container:
image: 7272721/i2-ci:latest
steps:
Expand Down Expand Up @@ -57,6 +57,22 @@ jobs:
PROFILE=--release
BIN=iroha_crypto_cli
build-ci-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push Docker container
uses: docker/build-push-action@v2
with:
file: Dockerfile.ci
tags: hyperledger/ci-iroha2:latest
push: true

archive-and-publish-schema:
runs-on: ubuntu-latest
container: rust:1.56-buster
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/iroha2-push-ci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.56.0
RUST_VERSION=1.57.0



Expand Down Expand Up @@ -50,7 +50,7 @@ RUN git clone https://github.com/rui314/mold.git; \
rm -rf "./mold"

RUN rustup component add llvm-tools-preview clippy; \
rustup install --profile default nightly-2021-10-22; \
rustup install --profile default nightly-2021-12-02; \
cargo install cargo-lints grcov

RUN curl -fsSL https://get.docker.com -o get-docker.sh; \
Expand Down
1 change: 0 additions & 1 deletion p2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod peer;
/// The main type to use for secure communication.
pub type Network<T> = NetworkBase<T, X25519Sha256, ChaCha20Poly1305>;


/// Errors used in [`crate`].
#[derive(Clone, Debug, iroha_macro::FromVariant, Error, iroha_actor::Message)]
pub enum Error {
Expand Down

0 comments on commit 2a2791e

Please sign in to comment.