git.delta.rocks / unique-network / refs/commits / 2f442abbf92d

difftreelog

Merge pull request #863 from UniqueNetwork/feature/ci-make-bench

Yaroslav Bolyukin2023-01-30parents: #065da6d #4a186f2.patch.diff
in: master
Feature/ci make bench

2 files changed

modified.github/workflows/codestyle.ymldiffbeforeafterboth
before · .github/workflows/codestyle.yml
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing2# Nested workflow for checks related to formatting Rust code 34name: codestyle56# Triger: only call from main workflow(re-usable workflows)7on:8  workflow_call:910jobs:11  rustfmt:12    runs-on: [ self-hosted-ci ]13    steps:14      - name: Clean Workspace15        uses: AutoModality/action-clean@v1.1.016      - uses: actions/checkout@v317        with:18          ref: ${{ github.head_ref }}            19      - name: Install latest nightly20        uses: actions-rs/toolchain@v121        with:22            toolchain: nightly23            default: true24            target: wasm32-unknown-unknown25            components: rustfmt, clippy26      - name: Run cargo fmt27        run: cargo fmt -- --check   # In that mode it returns only exit code.28      - name: Cargo fmt state29        if: success()30        run: echo "Nothing to do. Command 'cargo fmt -- --check' returned exit code 0."3132  yarn_eslint:33    runs-on: [ self-hosted-ci ]34    steps:35      - name: Clean Workspace36        uses: AutoModality/action-clean@v1.1.037      - uses: actions/checkout@v338        with:39          ref: ${{ github.head_ref }}            40      - uses: actions/setup-node@v341        with:42          node-version: 1643      - name: Install modules44        run: cd tests && yarn45      - name: Run ESLint46        run: cd tests && yarn eslint --ext .ts,.js src/4748  clippy:49    if: ${{ false }}50    runs-on: [ self-hosted-ci ]51    steps:52      - uses: actions/checkout@v353      - name: Install substrate dependencies54        run: sudo apt-get install libssl-dev pkg-config libclang-dev clang protobuf-compiler55      - name: Install latest nightly56        uses: actions-rs/toolchain@v157        with:58            toolchain: nightly59            default: true60            target: wasm32-unknown-unknown61            components: rustfmt, clippy62      - name: Run cargo check63        run: cargo clippy -- -Dwarnings
added.github/workflows/make-bench.ymldiffbeforeafterboth
--- /dev/null
+++ b/.github/workflows/make-bench.yml
@@ -0,0 +1,57 @@
+# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing
+# Nested workflow for checks related to formatting Rust code 
+
+name: make-bench
+
+# Triger: only call from main workflow(re-usable workflows)
+on:
+  push:
+    branches:
+      - "feature/ci-make-bench"
+  workflow_dispatch:
+
+jobs:
+  make-bench:
+    runs-on: [ bench ]
+    steps:
+      - name: Clean Workspace
+        uses: AutoModality/action-clean@v1.1.0
+
+      - uses: actions/checkout@v3.3.0
+        with:
+          ref: develop 
+
+      - name: Read .env file
+        uses: xom9ikk/dotenv@v2.1.1        
+
+      - name: Install substrate dependencies
+        run: sudo apt install -y curl cmake make libssl-dev pkg-config libclang-dev clang protobuf-compiler
+
+      - name: Install actual toolchain
+        uses: actions-rs/toolchain@v1.0.7
+        with:
+            toolchain: ${{ env.RUST_TOOLCHAIN }}
+            default: true
+            target: wasm32-unknown-unknown
+
+      - name: RUN benchmarking
+        run: |
+          time make bench
+
+      - name: show git diff
+        run: |
+          git diff
+
+      - name: Create Pull Request
+        uses: peter-evans/create-pull-request@v4.2.3
+        with:
+          base: develop
+          branch: ci/make-bench
+          commit-message: commit benchmarking
+          committer: Unique <noreply@github.com>
+          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
+          signoff: false
+          delete-branch: true
+          title: 'CI Make Benchmarking'
+          assignees: CertainLach
+          reviewers: CertainLach