Skip to content

Commit bd8dee5

Browse files
committed
feat: add CircleCI job for building substreams-tron Rust package
- Add dedicated build-substreams-tron job with Rust 1.75 image - Install wasm32-unknown-unknown target for WebAssembly compilation - Add cargo caching for faster builds - Run tests as part of the CI job - Update package.json to skip lerna build (requires Rust toolchain)
1 parent 320874e commit bd8dee5

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ references:
66
image: cimg/node:22.14
77
environment:
88
NODE_OPTIONS: '--max-old-space-size=4096'
9+
rust_image: &rust_image
10+
image: cimg/rust:1.75
911
ipfs_image: &ipfs_image
1012
image: requestnetwork/request-ipfs:v0.13.0
1113
ganache_image: &ganache_image
@@ -253,6 +255,35 @@ jobs:
253255
name: 'Build toolbox'
254256
command: 'yarn workspace @requestnetwork/toolbox run build'
255257

258+
build-substreams-tron:
259+
docker:
260+
- *rust_image
261+
working_directory: *working_directory
262+
steps:
263+
- checkout
264+
- run:
265+
name: 'Install wasm32 target'
266+
command: rustup target add wasm32-unknown-unknown
267+
- restore_cache:
268+
name: Restore Cargo Cache
269+
keys:
270+
- cargo-cache-{{ checksum "packages/substreams-tron/Cargo.toml" }}
271+
- cargo-cache-
272+
- run:
273+
name: 'Build substreams-tron'
274+
command: make build
275+
working_directory: ~/repo/packages/substreams-tron
276+
- save_cache:
277+
name: Save Cargo Cache
278+
key: cargo-cache-{{ checksum "packages/substreams-tron/Cargo.toml" }}
279+
paths:
280+
- ~/.cargo
281+
- packages/substreams-tron/target
282+
- run:
283+
name: 'Run tests'
284+
command: make test
285+
working_directory: ~/repo/packages/substreams-tron
286+
256287
test-nightly:
257288
docker:
258289
- *node_image
@@ -324,6 +355,7 @@ workflows:
324355
build-and-test:
325356
jobs:
326357
- build
358+
- build-substreams-tron
327359
- test-unit:
328360
requires:
329361
- build
@@ -348,6 +380,7 @@ workflows:
348380
requires:
349381
- lint
350382
- build
383+
- build-substreams-tron
351384
- test-unit
352385
- test-integration-with-smart-contracts
353386
- test-integration-with-request-node

packages/substreams-tron/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Request Network TRON Substreams module for ERC20FeeProxy payment detection",
55
"private": true,
66
"scripts": {
7-
"build": "make build",
7+
"build": "echo 'Substreams-tron requires Rust toolchain. Run make build directly or use CI.'",
8+
"build:rust": "make build",
89
"protogen": "make protogen",
910
"package": "make package",
1011
"gui": "make gui",

0 commit comments

Comments
 (0)