Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
882889e
add job to expand test vectors to track changes to generated code
leighmcculloch Sep 26, 2025
942cdf7
rename expand workflow to expand-tests
leighmcculloch Sep 26, 2025
0ab915b
update cargo-expand version to 1.0.116
leighmcculloch Sep 27, 2025
e980a00
update stellar binaries to v41 and cargo-semver-checks to v0.44
leighmcculloch Sep 27, 2025
cf19bf2
always expand with the linux target
leighmcculloch Sep 27, 2025
026434c
make wasms build before expand so that wasm files are available to im…
leighmcculloch Sep 27, 2025
d79d9ec
add cargo-hack binary dependency
leighmcculloch Sep 27, 2025
91a5953
Merge branch 'main' into i1544-test-improvements-expand
leighmcculloch Sep 30, 2025
24ffc6f
upd
leighmcculloch Sep 30, 2025
5c3123d
Recombine the build and test ci runs
leighmcculloch Sep 30, 2025
e234ee1
combine msrv and latest tests into single runs
leighmcculloch Sep 30, 2025
d6867ff
Revert "combine msrv and latest tests into single runs"
leighmcculloch Sep 30, 2025
92bf728
Merge branch 'combine-build-test' into i1544-test-improvements-expand
leighmcculloch Sep 30, 2025
dad1edc
update rust workflow to use makefile for msrv and add target updates
leighmcculloch Sep 30, 2025
11770c3
fix installed rusts
leighmcculloch Sep 30, 2025
b659d66
Merge branch 'combine-build-test' into i1544-test-improvements-expand
leighmcculloch Sep 30, 2025
2f59f5c
update rust installation to use msrv and latest versions
leighmcculloch Sep 30, 2025
c1ed995
few fix ups
leighmcculloch Sep 30, 2025
db7882d
add clippy and rustfmt components for msrv toolchain
leighmcculloch Sep 30, 2025
e0b0ea0
Merge branch 'build-fix-ups' into i1544-test-improvements-expand
leighmcculloch Sep 30, 2025
78a33d6
add conditional check for latest rust version
leighmcculloch Sep 30, 2025
ba10ad4
add build-fuzz job to workflow
leighmcculloch Sep 30, 2025
0491146
add check for uncommitted changes in ci
leighmcculloch Sep 30, 2025
a7a8394
add cargo version check to workflows
leighmcculloch Sep 30, 2025
b484483
update rust workflow to use toolchain variable and cache
leighmcculloch Sep 30, 2025
f3b54b0
Merge branch 'build-fix-ups' into i1544-test-improvements-expand
leighmcculloch Sep 30, 2025
9536acf
remove conditional rust installation in ci workflow
leighmcculloch Sep 30, 2025
8ae32e3
upd
leighmcculloch Sep 30, 2025
4103648
remove rustup update step and add rustflags for test expansion
leighmcculloch Sep 30, 2025
c137d3f
Merge branch 'main' into i1544-test-improvements-expand
leighmcculloch Sep 30, 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
22 changes: 22 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,28 @@ jobs:
git grep "${version}" -- soroban-sdk/src/_migrating.rs \
|| (echo "The _migrating ${version} section is missing." && exit 1)

expand-test-wasms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: stellar/actions/rust-cache@main
- name: Install minimum supported rust version
run: |
msrv="$(make msrv)"
rustup install $msrv
rustup target add --toolchain $msrv wasm32v1-none
- uses: stellar/binaries@v45
with:
name: cargo-hack
version: 0.5.28
- uses: stellar/binaries@v45
with:
name: cargo-expand
version: 1.0.116
- run: make expand-tests
- name: Check no diffs exist
run: git add -N . && git diff HEAD --exit-code

publish-dry-run:
if: github.event_name == 'push' || startsWith(github.head_ref, 'release/')
strategy:
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ readme:
| jq -r '.index[.root|tostring].docs' \
> README.md

# Expands the generated code within each test vector contract that lives in the
# tests/ directory. Serves to surface visible changes in generated code that
# may not be obvious when making changes to sdk macros.
expand-tests: build-test-wasms
rm -fr tests-expanded
mkdir -p tests-expanded
RUSTUP_TOOLCHAIN=$(TEST_CRATES_RUSTUP_TOOLCHAIN) ; \
RUSTFLAGS='--cfg soroban_sdk_internal_no_rssdkver_meta' ; \
for package in $(TEST_CRATES); do \
echo "Expanding $$package for linux target including tests"; \
cargo expand --package $$package --tests --target x86_64-unknown-linux-gnu | rustfmt > tests-expanded/$${package}_tests.rs; \
echo "Expanding $$package for wasm32v1-none target without tests"; \
RUSTFLAGS='--cfg soroban_sdk_internal_no_rssdkver_meta' \
cargo expand --package $$package --release --target wasm32v1-none | rustfmt > tests-expanded/$${package}_wasm32v1-none.rs; \
done

fmt:
cargo fmt --all

Expand Down
Loading