Skip to content

Commit 4e1c563

Browse files
Slim shells across all remaining workflows; drop redundant forge/rm
- flake.nix: re-export .#sol-shell and .#rust-shell (alongside the existing .#wasm-shell / .#subgraph-shell) so all workflows can pin to flake.lock rainix rev. - copilot-setup-steps.yml: drop forge install + forge build entirely (committed ABIs + vendored IMulticall3.sol mean cargo doesn't need them; forge stays available via .#sol-shell on demand). Inline raindex-ui-components-prelude body. Use .#wasm-shell. - npm-package-release.yml: drop forge install + forge build same as above. Drop the two rm -rf target/debug guards that pre-dated the Swatinem/rust-cache add (free-disk-space@v1 + 8G swap handle the budget; the rm was defeating the cache we just added). Switch the remaining nix develop -c calls to .#wasm-shell. - manual-rs-release.yml: .#rust-shell for cargo release (verified cargo-release is in rainix rust-shell). - test-webapp.yaml / test-ui-components.yaml: drop the CARGO_HOME + CARGO_TARGET_DIR env redirect (legacy from prep-webapp era). It was sending cargo output to .cargo/target/, but packages/raindex/scripts/buildPackage.js hardcodes ../../target/... for wasm-bindgen — the redirect made wasm-bindgen fail to find the .wasm.
1 parent 2853b55 commit 4e1c563

6 files changed

Lines changed: 32 additions & 26 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,19 @@ jobs:
4848
cp -f .env.example .env
4949
cp -f packages/webapp/.env.example packages/webapp/.env
5050
cp -f .env.example crates/common/.env
51-
# Inlined bootstrap (formerly ./prep-all.sh):
52-
- run: nix develop -c forge soldeer install
53-
- run: nix develop -c forge build
54-
- run: nix develop -c raindex-ui-components-prelude
55-
- run: nix develop -c npm run build -w @rainlanguage/raindex
56-
- run: nix develop -c npm run build -w @rainlanguage/ui-components
57-
- run: nix develop -c npm run build -w @rainlanguage/webapp
51+
# Inlined bootstrap (formerly ./prep-all.sh). All committed ABIs +
52+
# vendored IMulticall3.sol mean cargo doesn't need forge build /
53+
# soldeer install — forge is still on PATH in .#sol-shell if copilot
54+
# needs it later.
55+
- run: |
56+
nix develop .#wasm-shell -c bash -c '
57+
set -euxo pipefail
58+
npm install --no-check
59+
(cd packages/ui-components && npm i && npm run lint)
60+
npm run build -w @rainlanguage/raindex
61+
npm run build -w @rainlanguage/ui-components
62+
npm run build -w @rainlanguage/webapp
63+
'
5864
# forwards status to telegram chat if this ci fails or gets canceled, only runs for default branch
5965
- name: Forward CI Status
6066
if: always()

.github/workflows/manual-rs-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# before trying to save a new cache
2525
# 1G = 1073741824
2626
gc-max-store-size-linux: 1G
27-
- run: nix develop --command cargo release --workspace
27+
- run: nix develop .#rust-shell --command cargo release --workspace
2828
# forwards status to telegram chat if this ci fails or gets canceled, only runs for default branch
2929
- name: Forward CI Status
3030
if: always()

.github/workflows/npm-package-release.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,11 @@ jobs:
108108
exit 1
109109
fi
110110
echo "Repositories match"
111-
# install dependencies and build the workspace
112-
- run: nix develop -c forge soldeer install
113-
- run: nix develop -c forge build
114-
# remove debug artifacts to free disk space before WASM build
115-
- name: Remove Unused Artifacts
116-
run: rm -rf ./target/debug
111+
# forge install + build is no longer needed here — all sol! macros
112+
# read committed ABIs under crates/*/abis/, and the wasm + npm builds
113+
# below don't shell out to forge. The prior "Remove Unused Artifacts"
114+
# / debug-dir scrubs went with forge; rust-cache + free-disk-space@v1
115+
# handle disk budget for the remaining WASM builds.
117116
# WASM linker can run out of memory on GitHub runners; add swap to prevent OOM
118117
- name: Add swap space
119118
run: |
@@ -127,20 +126,23 @@ jobs:
127126
sudo swapon /swapfile
128127
# build and test WASM bindings
129128
- name: Test JS/TS Binding 1/2
130-
run: nix develop -c rainix-wasm-test
131-
# cleanup between test phases to prevent disk space exhaustion
132-
- name: Remove Test Artifacts
133129
run: |
134-
rm -rf ./target/debug
135-
rm -rf ./target/wasm32-unknown-unknown/debug
130+
nix develop .#wasm-shell -c bash -c "CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner cargo test --target wasm32-unknown-unknown --lib -p raindex_quote -p raindex_bindings -p raindex_js_api -p raindex_common"
136131
# run JS/TS integration tests against WASM bindings
137132
- name: Test JS/TS Binding 2/2
138-
run: nix develop -c test-js-bindings
133+
run: |
134+
nix develop .#wasm-shell -c bash -c '
135+
set -euxo pipefail
136+
npm install --no-check
137+
cd packages/raindex
138+
npm run build
139+
npm test
140+
'
139141
# build and test UI components before publishing
140142
- name: Build UI Components
141-
run: nix develop -c npm run build -w @rainlanguage/ui-components
143+
run: nix develop .#wasm-shell -c npm run build -w @rainlanguage/ui-components
142144
- name: Test UI Components
143-
run: nix develop -c npm run test -w @rainlanguage/ui-components
145+
run: nix develop .#wasm-shell -c npm run test -w @rainlanguage/ui-components
144146
# check for npm package blacklists pkgs across all raindex related packages
145147
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main
146148
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main

.github/workflows/test-ui-components.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ jobs:
4646
env:
4747
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
4848
COMMIT_SHA: ${{ github.sha }}
49-
CARGO_HOME: ${{ github.workspace }}/.cargo
50-
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target
5149
- run: nix develop .#wasm-shell -c npm run svelte-lint-format-check -w @rainlanguage/ui-components
5250
- run: nix develop .#wasm-shell -c npm run test -w @rainlanguage/ui-components
5351
# check for npm package blacklists pkgs across all packages

.github/workflows/test-webapp.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ jobs:
4646
env:
4747
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
4848
COMMIT_SHA: ${{ github.sha }}
49-
CARGO_HOME: ${{ github.workspace }}/.cargo
50-
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target
5149
- run: nix develop .#wasm-shell -c npm run svelte-lint-format-check -w @rainlanguage/webapp
5250
env:
5351
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@
197197
# bypasses flake.lock and tracks rainix main).
198198
devShells.wasm-shell = rainix.devShells.${system}.wasm-shell;
199199
devShells.subgraph-shell = rainix.devShells.${system}.subgraph-shell;
200+
devShells.sol-shell = rainix.devShells.${system}.sol-shell;
201+
devShells.rust-shell = rainix.devShells.${system}.rust-shell;
200202
}
201203
);
202204

0 commit comments

Comments
 (0)