From 38d66506849533c3960f6597e30c86a781f5874c Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 15:30:14 +0300 Subject: [PATCH 01/42] maximize CI space --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 59ae770e9..215b61889 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,6 +14,9 @@ jobs: name: Project setup runs-on: ubuntu-latest steps: + - name: Maximize build space + uses: easimon/maximize-build-space@v10 + - name: Checkout code uses: actions/checkout@v4 From f7f195d55ad97e803211c8397392dbc7f461f6e1 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 15:39:25 +0300 Subject: [PATCH 02/42] try this? --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 215b61889..2bf21e5d1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Maximize build space uses: easimon/maximize-build-space@v10 + with: + build-mount-path: /home/runner - name: Checkout code uses: actions/checkout@v4 From 79d86bf9d0c299729f009844699841a8c4417afe Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 15:41:27 +0300 Subject: [PATCH 03/42] this? --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2bf21e5d1..cbb1be948 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,7 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@v10 with: - build-mount-path: /home/runner + root-reserve-mb: 4096 - name: Checkout code uses: actions/checkout@v4 From c45a294f15d85f882c6c244a0edc87c5e7b650aa Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 15:53:14 +0300 Subject: [PATCH 04/42] run it all --- .github/actions/style/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index e81a9315d..fa09c7911 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | echo "Checking for Markdown/MDX changes..." - if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then if ! pnpm check:md; then echo "Markdown or MDX files are not properly formatted." exit 1 # Exit with a non-zero status code to indicate failure @@ -28,10 +28,10 @@ runs: shell: bash run: | echo "Checking for Rust code changes..." - if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then echo "Running checks for the Rust code..." - # Install the nightly toolchain + # Install the nightly toolchain rustup toolchain install nightly # Install rustfmt for the nightly toolchain @@ -54,7 +54,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in node-ui files" - if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then echo "Running checks for the node-ui..." cd node-ui if ! pnpm prettier:check .; then @@ -75,7 +75,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in calimero-sdk files" - if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then echo "Running checks for the calimero-sdk files" cd packages/calimero-sdk if ! pnpm prettier:check .; then From b6bdbf9ad5aec12092f6e643ea6c1792a3292122 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 15:56:14 +0300 Subject: [PATCH 05/42] how're we looking? --- .github/workflows/rust.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cbb1be948..d001ff0f5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,36 +22,76 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: How're we looking? + run: | + df -h + # Install Node.js (version 20) and pnpm - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '20' + - name: How're we looking? + run: | + df -h + - name: Install pnpm run: npm install -g pnpm + - name: How're we looking? + run: | + df -h + # Install and build node-ui - name: Install node-ui dependencies with pnpm run: pnpm install --prefix ./node-ui + - name: How're we looking? + run: | + df -h + - name: Build node-ui run: pnpm --filter ./node-ui run build + - name: How're we looking? + run: | + df -h + - name: Setup rust toolchain run: rustup toolchain install stable --profile minimal + - name: How're we looking? + run: | + df -h + - name: Setup rust cache uses: Swatinem/rust-cache@v2 + - name: How're we looking? + run: | + df -h + - name: Run code style checks uses: ./.github/actions/style + - name: How're we looking? + run: | + df -h + - name: Build run: cargo build --verbose + + - name: How're we looking? + run: | + df -h - name: Run tests run: | chmod +x $GITHUB_WORKSPACE/scripts/build-all-apps.sh chmod +x $GITHUB_WORKSPACE/scripts/test.sh $GITHUB_WORKSPACE/scripts/test.sh + + - name: How're we looking? + run: | + df -h From 95fb29da0afafe41055964ebb7adce6933f4e2cd Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 16:11:16 +0300 Subject: [PATCH 06/42] keep home in our volume --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d001ff0f5..9dc0b5e92 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,6 +7,7 @@ on: branches: ['master'] env: + CARGO_HOME: ${{ github.workspace }}/.cargo CARGO_TERM_COLOR: always jobs: From 53423bf448cf556050a3fe96c019900609af3c44 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 16:12:22 +0300 Subject: [PATCH 07/42] fix formatter CI --- .../src/subscriptions/subscriptions.ts | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/calimero-sdk/src/subscriptions/subscriptions.ts b/packages/calimero-sdk/src/subscriptions/subscriptions.ts index 97b172c7f..ec32d3742 100644 --- a/packages/calimero-sdk/src/subscriptions/subscriptions.ts +++ b/packages/calimero-sdk/src/subscriptions/subscriptions.ts @@ -5,7 +5,10 @@ export interface SubscriptionsClient { disconnect(connectionId?: string): void; subscribe(contextIds: string[], connectionId?: string): void; unsubscribe(contextIds: string[], connectionId?: string): void; - addCallback(callback: (event: NodeEvent) => void, connectionId?: string): void; + addCallback( + callback: (event: NodeEvent) => void, + connectionId?: string, + ): void; removeCallback( callback: (event: NodeEvent) => void, connectionId?: string, @@ -16,21 +19,23 @@ export type NodeEvent = ContextEvent; export type ContextEvent = ContextEventPayload & { contextId: ContextId; -} - -type ContextEventPayload = { - type: 'StateMutation', - data: StateMutation, -} | { - type: 'ExecutionEvent', - data: ExecutionEvent, }; +type ContextEventPayload = + | { + type: 'StateMutation'; + data: StateMutation; + } + | { + type: 'ExecutionEvent'; + data: ExecutionEvent; + }; + export interface StateMutation { newRoot: string; } export interface ExecutionEvent { - kind: string, - data: any, + kind: string; + data: any; } From 0fa5d33a06e54be24a2ef834d342b69277280818 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 16:23:06 +0300 Subject: [PATCH 08/42] retain cargo where it is :shrug --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9dc0b5e92..d001ff0f5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,7 +7,6 @@ on: branches: ['master'] env: - CARGO_HOME: ${{ github.workspace }}/.cargo CARGO_TERM_COLOR: always jobs: From 6dad39554300dcfe27b5b7b5d8d0fb8abd196303 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:01:33 +0300 Subject: [PATCH 09/42] test rustup, cargo & pnpm relocation --- .github/workflows/rust.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d001ff0f5..3769e7ac8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,6 +7,9 @@ on: branches: ['master'] env: + CARGO_HOME: ${{ github.workspace }}/.home/.cargo + RUSTUP_HOME: ${{ github.workspace }}/.home/.rustup + PNPM_HOME: ${{ github.workspace }}/.home/.pnpm CARGO_TERM_COLOR: always jobs: @@ -18,6 +21,13 @@ jobs: uses: easimon/maximize-build-space@v10 with: root-reserve-mb: 4096 + + - name: Relocate environment + run: | + mkdir .home + mv ~/.cargo .home/ + mv ~/.rustup .home/ + echo "$HOME/.home/.cargo/bin" >> $GITHUB_PATH - name: Checkout code uses: actions/checkout@v4 @@ -26,7 +36,7 @@ jobs: run: | df -h - # Install Node.js (version 20) and pnpm + # Install Node.js (version 20) and pnpm - name: Set up Node.js uses: actions/setup-node@v2 with: From 1e6be9a666069ec99d295c98b52f648808760708 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:01:46 +0300 Subject: [PATCH 10/42] ignore clippy for now --- .github/actions/style/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index fa09c7911..0382b29d7 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -41,7 +41,7 @@ runs: echo "Rust code is not properly formatted." exit 1 # Exit with a non-zero status code if formatting fails fi - if ! cargo clippy; then + if ! cargo clippy -- -A warnings; then echo "Rust code is not properly linted." exit 1 # Exit with a non-zero status code if formatting fails fi From d281cbd0e5a29d6f471ace14f3165ecde24000eb Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:05:25 +0300 Subject: [PATCH 11/42] try this? --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3769e7ac8..13b00e9dd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,7 +27,7 @@ jobs: mkdir .home mv ~/.cargo .home/ mv ~/.rustup .home/ - echo "$HOME/.home/.cargo/bin" >> $GITHUB_PATH + echo "$HOME/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - name: Checkout code uses: actions/checkout@v4 From fef33056a635263b32fd3cef89a8806db08a7e87 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:09:30 +0300 Subject: [PATCH 12/42] check path --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 13b00e9dd..ead5cb2eb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,7 +28,11 @@ jobs: mv ~/.cargo .home/ mv ~/.rustup .home/ echo "$HOME/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - + cat $GITHUB_PATH + + - name: Check environment + run: echo $PATH + - name: Checkout code uses: actions/checkout@v4 From e2d3e793d63c0919613607be3ec44ef92f1090ad Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:12:09 +0300 Subject: [PATCH 13/42] right.. --- .github/workflows/rust.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ead5cb2eb..3b91a4646 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,12 +27,8 @@ jobs: mkdir .home mv ~/.cargo .home/ mv ~/.rustup .home/ - echo "$HOME/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - cat $GITHUB_PATH + echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - - name: Check environment - run: echo $PATH - - name: Checkout code uses: actions/checkout@v4 From 7bd0f2a75a37c9df8044d392df569aa3327f72c2 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:15:09 +0300 Subject: [PATCH 14/42] huh? --- .github/workflows/rust.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3b91a4646..1963773fc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,7 +28,12 @@ jobs: mv ~/.cargo .home/ mv ~/.rustup .home/ echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + cat $GITHUB_PATH + - name: Check environment + run: | + echo $PATH + - name: Checkout code uses: actions/checkout@v4 From 4cdcf777b9a78bd96002b226d635936369c97eb2 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:17:32 +0300 Subject: [PATCH 15/42] where? --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1963773fc..4c3877765 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,11 +24,14 @@ jobs: - name: Relocate environment run: | + which rustup mkdir .home mv ~/.cargo .home/ mv ~/.rustup .home/ echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH cat $GITHUB_PATH + which rustup + ls "$PWD/.home/.cargo/bin" - name: Check environment run: | From 316b29f9ac65e380c125c6085400a0f4e80ca398 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:20:34 +0300 Subject: [PATCH 16/42] interesting --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4c3877765..27be109c3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,7 +31,8 @@ jobs: echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH cat $GITHUB_PATH which rustup - ls "$PWD/.home/.cargo/bin" + ls "$PWD/.home" + ls "$PWD/.home/.cargo" - name: Check environment run: | From 182dcc21211d6156a6dbe3fe939a5895f52202ac Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:23:41 +0300 Subject: [PATCH 17/42] hello? --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 27be109c3..c15eeaace 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,9 +27,12 @@ jobs: which rustup mkdir .home mv ~/.cargo .home/ + ls .home mv ~/.rustup .home/ + ls .home echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH cat $GITHUB_PATH + echo "done.., testing" which rustup ls "$PWD/.home" ls "$PWD/.home/.cargo" From 5023674f987fa6d4ad9208fda34d2ba24680e6a7 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:24:54 +0300 Subject: [PATCH 18/42] right.. --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c15eeaace..cba42b262 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,9 +33,9 @@ jobs: echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH cat $GITHUB_PATH echo "done.., testing" - which rustup ls "$PWD/.home" ls "$PWD/.home/.cargo" + which rustup - name: Check environment run: | From a598ed976b71608a39244588fb388c015ebe35a3 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:28:36 +0300 Subject: [PATCH 19/42] physical frustration --- .github/workflows/rust.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cba42b262..657cd39fa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,14 +27,17 @@ jobs: which rustup mkdir .home mv ~/.cargo .home/ - ls .home + ls -a .home mv ~/.rustup .home/ - ls .home + ls -a .home + cat $GITHUB_PATH + echo "pre" echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + echo "post" cat $GITHUB_PATH echo "done.., testing" - ls "$PWD/.home" - ls "$PWD/.home/.cargo" + ls -a "$PWD/.home" + ls -a "$PWD/.home/.cargo" which rustup - name: Check environment From 0006d9a1b6d99b2896658adf186ea1edc85b3239 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:33:06 +0300 Subject: [PATCH 20/42] and now? --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 657cd39fa..78730a818 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,11 +38,12 @@ jobs: echo "done.., testing" ls -a "$PWD/.home" ls -a "$PWD/.home/.cargo" - which rustup + ls -a "$PWD/.home/.cargo/bin" - name: Check environment run: | echo $PATH + which rustup - name: Checkout code uses: actions/checkout@v4 From a05d99eefb61f9166fbb4c04c9bea4b266353e20 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:37:35 +0300 Subject: [PATCH 21/42] how? --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 78730a818..f2bc1c3b2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,6 +44,7 @@ jobs: run: | echo $PATH which rustup + rustup --version - name: Checkout code uses: actions/checkout@v4 From d6178bf3e7d74dccfa8ee9c18ab5ac7f49e7386f Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:39:18 +0300 Subject: [PATCH 22/42] what??? --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f2bc1c3b2..ba4f5a5e0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -85,6 +85,12 @@ jobs: run: | df -h + - name: Check environment + run: | + echo $PATH + which rustup + rustup --version + - name: Setup rust toolchain run: rustup toolchain install stable --profile minimal From 47fd1457dc6476fbb346ef6e8a241a2a6169cd00 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:42:56 +0300 Subject: [PATCH 23/42] yeah, it's as weird as it gets --- .github/workflows/rust.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ba4f5a5e0..2f982ae3a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -63,27 +63,27 @@ jobs: run: | df -h - - name: Install pnpm - run: npm install -g pnpm + # - name: Install pnpm + # run: npm install -g pnpm - - name: How're we looking? - run: | - df -h + # - name: How're we looking? + # run: | + # df -h - # Install and build node-ui - - name: Install node-ui dependencies with pnpm - run: pnpm install --prefix ./node-ui + # # Install and build node-ui + # - name: Install node-ui dependencies with pnpm + # run: pnpm install --prefix ./node-ui - - name: How're we looking? - run: | - df -h + # - name: How're we looking? + # run: | + # df -h - - name: Build node-ui - run: pnpm --filter ./node-ui run build + # - name: Build node-ui + # run: pnpm --filter ./node-ui run build - - name: How're we looking? - run: | - df -h + # - name: How're we looking? + # run: | + # df -h - name: Check environment run: | From 1b66a7993072f2082012e3d0470c809e96bc7ecf Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:45:11 +0300 Subject: [PATCH 24/42] okay.. --- .github/workflows/rust.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2f982ae3a..e915b7920 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -53,15 +53,15 @@ jobs: run: | df -h - # Install Node.js (version 20) and pnpm - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '20' + # # Install Node.js (version 20) and pnpm + # - name: Set up Node.js + # uses: actions/setup-node@v2 + # with: + # node-version: '20' - - name: How're we looking? - run: | - df -h + # - name: How're we looking? + # run: | + # df -h # - name: Install pnpm # run: npm install -g pnpm From 1cf8675a7c4856004690f8ec1f319d8ca1071425 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:48:21 +0300 Subject: [PATCH 25/42] of course.. it's the ones you don't expect --- .github/workflows/rust.yml | 71 +++++++++++++++----------------------- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e915b7920..cfb112108 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,68 +22,51 @@ jobs: with: root-reserve-mb: 4096 + - name: Checkout code + uses: actions/checkout@v4 + - name: Relocate environment run: | - which rustup mkdir .home mv ~/.cargo .home/ - ls -a .home mv ~/.rustup .home/ - ls -a .home - cat $GITHUB_PATH - echo "pre" echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - echo "post" - cat $GITHUB_PATH - echo "done.., testing" - ls -a "$PWD/.home" - ls -a "$PWD/.home/.cargo" - ls -a "$PWD/.home/.cargo/bin" - - - name: Check environment - run: | - echo $PATH - which rustup - rustup --version - - - name: Checkout code - uses: actions/checkout@v4 - name: How're we looking? run: | df -h - # # Install Node.js (version 20) and pnpm - # - name: Set up Node.js - # uses: actions/setup-node@v2 - # with: - # node-version: '20' + # Install Node.js (version 20) and pnpm + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' - # - name: How're we looking? - # run: | - # df -h + - name: How're we looking? + run: | + df -h - # - name: Install pnpm - # run: npm install -g pnpm + - name: Install pnpm + run: npm install -g pnpm - # - name: How're we looking? - # run: | - # df -h + - name: How're we looking? + run: | + df -h - # # Install and build node-ui - # - name: Install node-ui dependencies with pnpm - # run: pnpm install --prefix ./node-ui + # Install and build node-ui + - name: Install node-ui dependencies with pnpm + run: pnpm install --prefix ./node-ui - # - name: How're we looking? - # run: | - # df -h + - name: How're we looking? + run: | + df -h - # - name: Build node-ui - # run: pnpm --filter ./node-ui run build + - name: Build node-ui + run: pnpm --filter ./node-ui run build - # - name: How're we looking? - # run: | - # df -h + - name: How're we looking? + run: | + df -h - name: Check environment run: | From 0c4a7a1a46768388e4fec6315dbac20ab0efdfbb Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:53:58 +0300 Subject: [PATCH 26/42] can we use org scope? --- .github/workflows/rust.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cfb112108..21c8660d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,11 +20,9 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@v10 with: + build-mount-path: ${{ github.workspace }}/.. root-reserve-mb: 4096 - - name: Checkout code - uses: actions/checkout@v4 - - name: Relocate environment run: | mkdir .home @@ -32,6 +30,9 @@ jobs: mv ~/.rustup .home/ echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + - name: Checkout code + uses: actions/checkout@v4 + - name: How're we looking? run: | df -h From 9703239f35c16111faab927407b7d947d0fdd9bc Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 17:59:03 +0300 Subject: [PATCH 27/42] use parent --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 21c8660d4..97a4bd922 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,16 +11,20 @@ env: RUSTUP_HOME: ${{ github.workspace }}/.home/.rustup PNPM_HOME: ${{ github.workspace }}/.home/.pnpm CARGO_TERM_COLOR: always + WORKSPACE_PARENT: '' jobs: setup: name: Project setup runs-on: ubuntu-latest steps: + - name: Prepare + run: echo "WORKSPACE_PARENT=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV + - name: Maximize build space uses: easimon/maximize-build-space@v10 with: - build-mount-path: ${{ github.workspace }}/.. + build-mount-path: ${{ env.WORKSPACE_PARENT }} root-reserve-mb: 4096 - name: Relocate environment From a78c6e522746c7f5c3720e8a4f7788c8a5d3ab59 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:06:34 +0300 Subject: [PATCH 28/42] alt --- .github/workflows/rust.yml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 97a4bd922..3af007003 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,11 +7,12 @@ on: branches: ['master'] env: - CARGO_HOME: ${{ github.workspace }}/.home/.cargo - RUSTUP_HOME: ${{ github.workspace }}/.home/.rustup - PNPM_HOME: ${{ github.workspace }}/.home/.pnpm CARGO_TERM_COLOR: always - WORKSPACE_PARENT: '' + CARGO_HOME: + RUSTUP_HOME: + PNPM_HOME: + ALT_HOME: + STAGE_DIR: jobs: setup: @@ -19,20 +20,28 @@ jobs: runs-on: ubuntu-latest steps: - name: Prepare - run: echo "WORKSPACE_PARENT=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV + run: | + export STAGE_DIR=$(dirname $GITHUB_WORKSPACE) + echo "STAGE_DIR=$STAGE_DIR" >> $GITHUB_ENV + export ALT_HOME="$STAGE_DIR/.home" + echo "ALT_HOME=$ALT_HOME" >> $GITHUB_ENV + mkdir -p $ALT_HOME - name: Maximize build space uses: easimon/maximize-build-space@v10 with: - build-mount-path: ${{ env.WORKSPACE_PARENT }} + build-mount-path: ${{ env.STAGE_DIR }} root-reserve-mb: 4096 - name: Relocate environment run: | - mkdir .home - mv ~/.cargo .home/ - mv ~/.rustup .home/ - echo "$PWD/.home/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + echo "CARGO_HOME=$ALT_HOME/.cargo" >> $GITHUB_ENV + echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV + echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV + + mv ~/.cargo $CARGO_HOME + mv ~/.rustup $RUSTUP_HOME + echo "$CARGO_HOME/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - name: Checkout code uses: actions/checkout@v4 From 8d565ceedee485d649012aaa829664a9995a8232 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:08:28 +0300 Subject: [PATCH 29/42] yeah.. --- .github/workflows/rust.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3af007003..5faad1188 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -35,9 +35,12 @@ jobs: - name: Relocate environment run: | - echo "CARGO_HOME=$ALT_HOME/.cargo" >> $GITHUB_ENV - echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV - echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV + export "CARGO_HOME=$ALT_HOME/.cargo" + echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV + export "RUSTUP_HOME=$ALT_HOME/.rustup" + echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV + export "PNPM_HOME=$ALT_HOME/.pnpm" + echo "PNPM_HOME=$PNPM_HOME" >> $GITHUB_ENV mv ~/.cargo $CARGO_HOME mv ~/.rustup $RUSTUP_HOME From 7efb1afc761294548f41c87fcb2408b3e2676531 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:11:05 +0300 Subject: [PATCH 30/42] right.. --- .github/workflows/rust.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5faad1188..a8247e41b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -35,16 +35,13 @@ jobs: - name: Relocate environment run: | - export "CARGO_HOME=$ALT_HOME/.cargo" - echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV - export "RUSTUP_HOME=$ALT_HOME/.rustup" - echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV - export "PNPM_HOME=$ALT_HOME/.pnpm" - echo "PNPM_HOME=$PNPM_HOME" >> $GITHUB_ENV + echo "CARGO_HOME=$ALT_HOME/.cargo" >> $GITHUB_ENV + echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV + echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - mv ~/.cargo $CARGO_HOME - mv ~/.rustup $RUSTUP_HOME - echo "$CARGO_HOME/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + mv ~/.cargo $ALT_HOME + mv ~/.rustup $ALT_HOME + echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - name: Checkout code uses: actions/checkout@v4 From 7d9f1475db3aae0ec3bd95cbb3c5c0f77aa1ac4a Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:14:43 +0300 Subject: [PATCH 31/42] again? --- .github/actions/style/action.yml | 8 ++++---- .github/workflows/rust.yml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index 0382b29d7..4d8b59cde 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | echo "Checking for Markdown/MDX changes..." - if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then + if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then if ! pnpm check:md; then echo "Markdown or MDX files are not properly formatted." exit 1 # Exit with a non-zero status code to indicate failure @@ -28,7 +28,7 @@ runs: shell: bash run: | echo "Checking for Rust code changes..." - if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then + if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then echo "Running checks for the Rust code..." # Install the nightly toolchain @@ -54,7 +54,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in node-ui files" - if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then + if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then echo "Running checks for the node-ui..." cd node-ui if ! pnpm prettier:check .; then @@ -75,7 +75,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in calimero-sdk files" - if true || echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then + if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then echo "Running checks for the calimero-sdk files" cd packages/calimero-sdk if ! pnpm prettier:check .; then diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a8247e41b..00f28c100 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,9 +43,21 @@ jobs: mv ~/.rustup $ALT_HOME echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH + - name: Check environment + run: | + echo $PATH + which rustup + rustup --version + - name: Checkout code uses: actions/checkout@v4 + - name: Check environment + run: | + echo $PATH + which rustup + rustup --version + - name: How're we looking? run: | df -h From 17fd39fa64df7c870edbfe6573c4b8c73b40ccee Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:16:34 +0300 Subject: [PATCH 32/42] okay.. --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 00f28c100..defad0fb8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,6 +46,9 @@ jobs: - name: Check environment run: | echo $PATH + ls -a $ALT_HOME + ls -a $ALT_HOME/.cargo + ls -a $ALT_HOME/.cargo/bin which rustup rustup --version From 122324b612ca44540cbd41a186dabf17ab96e837 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:19:19 +0300 Subject: [PATCH 33/42] and now? --- .github/workflows/rust.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index defad0fb8..910e76786 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Prepare run: | - export STAGE_DIR=$(dirname $GITHUB_WORKSPACE) + export STAGE_DIR="$(dirname $GITHUB_WORKSPACE)" echo "STAGE_DIR=$STAGE_DIR" >> $GITHUB_ENV export ALT_HOME="$STAGE_DIR/.home" echo "ALT_HOME=$ALT_HOME" >> $GITHUB_ENV @@ -39,8 +39,8 @@ jobs: echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - mv ~/.cargo $ALT_HOME - mv ~/.rustup $ALT_HOME + mv ~/.cargo $ALT_HOME/ + mv ~/.rustup $ALT_HOME/ echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - name: Check environment @@ -96,12 +96,6 @@ jobs: - name: How're we looking? run: | df -h - - - name: Check environment - run: | - echo $PATH - which rustup - rustup --version - name: Setup rust toolchain run: rustup toolchain install stable --profile minimal From b363f0d1b349e99ee8e41c0eb5df9ae30c7ae7da Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:26:14 +0300 Subject: [PATCH 34/42] dude --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 910e76786..8db06def8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,6 +40,8 @@ jobs: echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV mv ~/.cargo $ALT_HOME/ + ls $ALT_HOME + exit 1 mv ~/.rustup $ALT_HOME/ echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH From fc8c3c717ddfbaa2b4a8299f04e6c84906bbc5d6 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:26:57 +0300 Subject: [PATCH 35/42] dude 2 --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8db06def8..890909063 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -39,7 +39,7 @@ jobs: echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - mv ~/.cargo $ALT_HOME/ + mv ~/.cargo $ALT_HOME/.cargo ls $ALT_HOME exit 1 mv ~/.rustup $ALT_HOME/ From 7c8dd4dec2190354d8ee8583f3714d9b2557e576 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:28:08 +0300 Subject: [PATCH 36/42] what else??? --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 890909063..7340ac16d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -39,7 +39,7 @@ jobs: echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - mv ~/.cargo $ALT_HOME/.cargo + mv ~/.cargo "$ALT_HOME/" ls $ALT_HOME exit 1 mv ~/.rustup $ALT_HOME/ From fd3195380727f332124b0d361193563fa3ed39dc Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:30:34 +0300 Subject: [PATCH 37/42] scorched earth --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7340ac16d..a1bbceb67 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -39,7 +39,8 @@ jobs: echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - mv ~/.cargo "$ALT_HOME/" + cd $ALT_HOME + mv ~/.cargo . ls $ALT_HOME exit 1 mv ~/.rustup $ALT_HOME/ From 1c6164f778552d37f7ae9078cac1e42b7adeeb65 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:32:10 +0300 Subject: [PATCH 38/42] why no create? --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a1bbceb67..84560a210 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,7 @@ jobs: echo "STAGE_DIR=$STAGE_DIR" >> $GITHUB_ENV export ALT_HOME="$STAGE_DIR/.home" echo "ALT_HOME=$ALT_HOME" >> $GITHUB_ENV - mkdir -p $ALT_HOME + mkdir $ALT_HOME - name: Maximize build space uses: easimon/maximize-build-space@v10 From 50a72a90fc7f276abc1aae383c9dff40933d57ec Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:33:51 +0300 Subject: [PATCH 39/42] sigh --- .github/workflows/rust.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 84560a210..8c806ff40 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,6 @@ jobs: echo "STAGE_DIR=$STAGE_DIR" >> $GITHUB_ENV export ALT_HOME="$STAGE_DIR/.home" echo "ALT_HOME=$ALT_HOME" >> $GITHUB_ENV - mkdir $ALT_HOME - name: Maximize build space uses: easimon/maximize-build-space@v10 @@ -39,19 +38,14 @@ jobs: echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - cd $ALT_HOME - mv ~/.cargo . - ls $ALT_HOME - exit 1 - mv ~/.rustup $ALT_HOME/ + mkdir $ALT_HOME + mv ~/.cargo $ALT_HOME + mv ~/.rustup $ALT_HOME echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - name: Check environment run: | echo $PATH - ls -a $ALT_HOME - ls -a $ALT_HOME/.cargo - ls -a $ALT_HOME/.cargo/bin which rustup rustup --version From ee91d22cecc3e1e5804c07e3530853841cbd6770 Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:37:40 +0300 Subject: [PATCH 40/42] full test --- .github/actions/style/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index 4d8b59cde..0382b29d7 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | echo "Checking for Markdown/MDX changes..." - if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then if ! pnpm check:md; then echo "Markdown or MDX files are not properly formatted." exit 1 # Exit with a non-zero status code to indicate failure @@ -28,7 +28,7 @@ runs: shell: bash run: | echo "Checking for Rust code changes..." - if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then echo "Running checks for the Rust code..." # Install the nightly toolchain @@ -54,7 +54,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in node-ui files" - if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then echo "Running checks for the node-ui..." cd node-ui if ! pnpm prettier:check .; then @@ -75,7 +75,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in calimero-sdk files" - if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then echo "Running checks for the calimero-sdk files" cd packages/calimero-sdk if ! pnpm prettier:check .; then From c4b27c544f1c67ee16671ea96ba9d37313e8ec8a Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:39:35 +0300 Subject: [PATCH 41/42] cleanup --- .github/actions/style/action.yml | 10 +++--- .github/workflows/rust.yml | 52 -------------------------------- 2 files changed, 5 insertions(+), 57 deletions(-) diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index 0382b29d7..fd4532a5b 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | echo "Checking for Markdown/MDX changes..." - if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then + if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then if ! pnpm check:md; then echo "Markdown or MDX files are not properly formatted." exit 1 # Exit with a non-zero status code to indicate failure @@ -28,7 +28,7 @@ runs: shell: bash run: | echo "Checking for Rust code changes..." - if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then + if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then echo "Running checks for the Rust code..." # Install the nightly toolchain @@ -41,7 +41,7 @@ runs: echo "Rust code is not properly formatted." exit 1 # Exit with a non-zero status code if formatting fails fi - if ! cargo clippy -- -A warnings; then + if ! cargo clippy; then echo "Rust code is not properly linted." exit 1 # Exit with a non-zero status code if formatting fails fi @@ -54,7 +54,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in node-ui files" - if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then + if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then echo "Running checks for the node-ui..." cd node-ui if ! pnpm prettier:check .; then @@ -75,7 +75,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in calimero-sdk files" - if true || echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then + if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then echo "Running checks for the calimero-sdk files" cd packages/calimero-sdk if ! pnpm prettier:check .; then diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8c806ff40..9afadc400 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,91 +43,39 @@ jobs: mv ~/.rustup $ALT_HOME echo "$ALT_HOME/.cargo/bin" | cat - $GITHUB_PATH > temp && mv temp $GITHUB_PATH - - name: Check environment - run: | - echo $PATH - which rustup - rustup --version - - name: Checkout code uses: actions/checkout@v4 - - name: Check environment - run: | - echo $PATH - which rustup - rustup --version - - - name: How're we looking? - run: | - df -h - # Install Node.js (version 20) and pnpm - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '20' - - name: How're we looking? - run: | - df -h - - name: Install pnpm run: npm install -g pnpm - - name: How're we looking? - run: | - df -h - # Install and build node-ui - name: Install node-ui dependencies with pnpm run: pnpm install --prefix ./node-ui - - name: How're we looking? - run: | - df -h - - name: Build node-ui run: pnpm --filter ./node-ui run build - - name: How're we looking? - run: | - df -h - - name: Setup rust toolchain run: rustup toolchain install stable --profile minimal - - name: How're we looking? - run: | - df -h - - name: Setup rust cache uses: Swatinem/rust-cache@v2 - - name: How're we looking? - run: | - df -h - - name: Run code style checks uses: ./.github/actions/style - - name: How're we looking? - run: | - df -h - - name: Build run: cargo build --verbose - - name: How're we looking? - run: | - df -h - - name: Run tests run: | chmod +x $GITHUB_WORKSPACE/scripts/build-all-apps.sh chmod +x $GITHUB_WORKSPACE/scripts/test.sh $GITHUB_WORKSPACE/scripts/test.sh - - - name: How're we looking? - run: | - df -h From ecc38f1588e14af8c7e4fa544eba5be34ca8f88f Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Thu, 31 Oct 2024 18:41:04 +0300 Subject: [PATCH 42/42] drop white spaces --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9afadc400..324ed57d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,7 @@ jobs: echo "STAGE_DIR=$STAGE_DIR" >> $GITHUB_ENV export ALT_HOME="$STAGE_DIR/.home" echo "ALT_HOME=$ALT_HOME" >> $GITHUB_ENV - + - name: Maximize build space uses: easimon/maximize-build-space@v10 with: @@ -37,7 +37,7 @@ jobs: echo "CARGO_HOME=$ALT_HOME/.cargo" >> $GITHUB_ENV echo "RUSTUP_HOME=$ALT_HOME/.rustup" >> $GITHUB_ENV echo "PNPM_HOME=$ALT_HOME/.pnpm" >> $GITHUB_ENV - + mkdir $ALT_HOME mv ~/.cargo $ALT_HOME mv ~/.rustup $ALT_HOME @@ -73,7 +73,7 @@ jobs: - name: Build run: cargo build --verbose - + - name: Run tests run: | chmod +x $GITHUB_WORKSPACE/scripts/build-all-apps.sh