Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): maximize disk space #909

Merged
merged 42 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
38d6650
maximize CI space
miraclx Oct 31, 2024
f7f195d
try this?
miraclx Oct 31, 2024
79d86bf
this?
miraclx Oct 31, 2024
c45a294
run it all
miraclx Oct 31, 2024
b6bdbf9
how're we looking?
miraclx Oct 31, 2024
95fb29d
keep home in our volume
miraclx Oct 31, 2024
53423bf
fix formatter CI
miraclx Oct 31, 2024
0fa5d33
retain cargo where it is :shrug
miraclx Oct 31, 2024
6dad395
test rustup, cargo & pnpm relocation
miraclx Oct 31, 2024
1e6be9a
ignore clippy for now
miraclx Oct 31, 2024
d281cbd
try this?
miraclx Oct 31, 2024
fef3305
check path
miraclx Oct 31, 2024
e2d3e79
right..
miraclx Oct 31, 2024
7bd0f2a
huh?
miraclx Oct 31, 2024
4cdcf77
where?
miraclx Oct 31, 2024
316b29f
interesting
miraclx Oct 31, 2024
182dcc2
hello?
miraclx Oct 31, 2024
5023674
right..
miraclx Oct 31, 2024
a598ed9
physical frustration
miraclx Oct 31, 2024
0006d9a
and now?
miraclx Oct 31, 2024
a05d99e
how?
miraclx Oct 31, 2024
d6178bf
what???
miraclx Oct 31, 2024
47fd145
yeah, it's as weird as it gets
miraclx Oct 31, 2024
1b66a79
okay..
miraclx Oct 31, 2024
1cf8675
of course..
miraclx Oct 31, 2024
0c4a7a1
can we use org scope?
miraclx Oct 31, 2024
9703239
use parent
miraclx Oct 31, 2024
a78c6e5
alt
miraclx Oct 31, 2024
8d565ce
yeah..
miraclx Oct 31, 2024
7efb1af
right..
miraclx Oct 31, 2024
7d9f147
again?
miraclx Oct 31, 2024
17fd39f
okay..
miraclx Oct 31, 2024
122324b
and now?
miraclx Oct 31, 2024
b363f0d
dude
miraclx Oct 31, 2024
fc8c3c7
dude 2
miraclx Oct 31, 2024
7c8dd4d
what else???
miraclx Oct 31, 2024
fd31953
scorched earth
miraclx Oct 31, 2024
1c6164f
why no create?
miraclx Oct 31, 2024
50a72a9
sigh
miraclx Oct 31, 2024
ee91d22
full test
miraclx Oct 31, 2024
c4b27c5
cleanup
miraclx Oct 31, 2024
ecc38f1
drop white spaces
miraclx Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,84 @@ jobs:
name: Project setup
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 4096

- 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
27 changes: 16 additions & 11 deletions packages/calimero-sdk/src/subscriptions/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
Loading