Skip to content

Schema codegen #2508

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
348f22e
Schema codegen
aumetra Jun 23, 2025
44419dc
Rename to ty to satisfy spell check
aumetra Jun 23, 2025
a33dea1
Add Go orb
aumetra Jun 23, 2025
9dfadf5
Install up-to-date Go
aumetra Jun 23, 2025
a805070
Install Rust via Orb
aumetra Jun 23, 2025
21f8052
Fix file
aumetra Jun 23, 2025
e4ed49f
Fix tests
aumetra Jun 23, 2025
1ce70de
Reverse codegen process
aumetra Jun 23, 2025
2227370
Update to Rust 1.86
aumetra Jun 23, 2025
066b28e
Snapshot upgrade
aumetra Jun 23, 2025
ef84635
Install NodeJS
aumetra Jun 23, 2025
732e914
Install pip
aumetra Jun 23, 2025
bfa2c61
Allow breaking system packages
aumetra Jun 23, 2025
301798f
Install via apk
aumetra Jun 23, 2025
4bb4daf
Fix Go single tuple enum variant codegen
chipshort Jun 25, 2025
18fa4fe
Install npm in coverage job
chipshort Jun 25, 2025
4ebc5c8
Fix unit variant serialization in Go
chipshort Jun 25, 2025
e044b25
Fix ts codegen single tuple enum variant
chipshort Jun 25, 2025
d48f757
Add failing python template test
chipshort Jun 25, 2025
ddc9f77
Fix python single tuple enum variant codegen
chipshort Jun 26, 2025
758ca1f
Fix python <3.10 support
chipshort Jun 26, 2025
41380b4
Ignore e2e tests requiring tools by default
chipshort Jun 26, 2025
7f4f1b7
Fix Go template
chipshort Jun 26, 2025
e40b7d6
Fix python tuple code-gen
chipshort Jun 26, 2025
c5cd435
Fix ts codegen
chipshort Jun 26, 2025
bdff0f9
Unify e2e tests
chipshort Jun 26, 2025
a798663
Merge branch 'main' into aw/codegen
chipshort Jun 27, 2025
5a0b40c
Fix cw-schema-codegen dependency
chipshort Jun 27, 2025
89d2b0b
Remove language check
chipshort Jun 27, 2025
07b7b04
Fix python bytes codegen
chipshort Jun 27, 2025
75a7cfc
Add schema-codegen metadata to Cargo.toml
chipshort Jun 27, 2025
aec7d90
Simplify ts codegen test
chipshort Jun 27, 2025
dc34ce6
Fix Rust codegen Binary type
chipshort Jun 27, 2025
b957252
Simplify rust e2e test for schema codegen
chipshort Jun 27, 2025
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
57 changes: 53 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
version: 2.1

orbs:
go: circleci/[email protected]
node: circleci/[email protected]
python: circleci/[email protected]
rust: circleci/[email protected]
win: circleci/[email protected]

commands:
Expand Down Expand Up @@ -71,6 +75,7 @@ workflows:
- package_schema
- package_schema_derive
- package_cw_schema
- package_cw_schema_codegen
- package_std
- package_vm
- package_vm_derive
Expand Down Expand Up @@ -447,6 +452,42 @@ jobs:
- target/debug/deps
key: cargocache-v2-package_cw_schema-rust:1.82-{{ checksum "Cargo.lock" }}

package_cw_schema_codegen:
executor:
name: python/default
steps:
- checkout
- rust/install:
version: "1.86"
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-package_cw_schema_codegen-rust:1.86-{{ checksum "Cargo.lock" }}
- go/install:
version: 1.23.4
- node/install
- run:
name: Install pydantic
command: pip install pydantic
- run:
name: Build
working_directory: ~/project/packages/cw-schema-codegen
command: cargo build --locked
- run:
name: Run tests
working_directory: ~/project/packages/cw-schema-codegen
# Use --include-ignored to also run ignored tests
command: cargo test --locked -- --include-ignored
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-package_cw_schema_codegen-rust:1.86-{{ checksum "Cargo.lock" }}

package_std:
docker:
- image: rust:1.82
Expand Down Expand Up @@ -1248,7 +1289,7 @@ jobs:

coverage:
docker:
- image: rust:1.84.1-alpine3.21
- image: rust:1.86-alpine3.21
resource_class: medium+
steps:
- checkout
Expand All @@ -1257,7 +1298,8 @@ jobs:
command: |
apk update
# needed for grcov and compiling tests
apk add --no-cache mold clang curl llvm19-dev clang19-static lcov
apk add --no-cache mold clang curl llvm19-dev clang19-static lcov python3 py3-pip py3-pydantic nodejs npm
ln -sf python3 /usr/bin/python
- run:
name: Install cargo-llvm-cov and cargo-nextest
command: |
Expand All @@ -1277,11 +1319,16 @@ jobs:
command: |
curl -L --proto '=https' --tlsv1.2 -OsSf https://cli.codecov.io/v10.1.1/alpine/codecov
chmod +x codecov
- go/install:
version: 1.23.4
- run:
name: Install pydantic
command: pip install pydantic --break-system-packages
- run:
name: Run tests with coverage
command: |
# Generate full coverage report
cargo llvm-cov nextest --all-features --lcov --output-path lcov.info
cargo llvm-cov nextest --all-features --run-ignored=all --lcov --output-path lcov.info

# List of package directories and their flags
# ToDo: Re-add "core:cosmwasm-core" when enabling core coverage again
Expand All @@ -1293,7 +1340,9 @@ jobs:
"schema-derive:cosmwasm-schema-derive" \
"std:cosmwasm-std" \
"vm:cosmwasm-vm" \
"vm-derive:cosmwasm-vm-derive"
"vm-derive:cosmwasm-vm-derive" \
"cw-schema:cw-schema" \
"cw-schema-codegen:cw-schema-codegen"

# Process each package-flag pair
for entry in "$@"; do
Expand Down
Loading
Loading