Skip to content

Commit

Permalink
f32/f64/usize in cosmwasm(and other no f32/f64 envs) reproduction and…
Browse files Browse the repository at this point in the history
… fixes (#894)

* fixed f64/f32 validation in wasm

* what to do with serde json? main one is float, fork from cw is std, my fork pr not merged for no std

* apply some adjustments + update cargo.lock for cw-check

* deps: bump serde-json-wasm to v1.0.0

* chore: add unclog

* ci: add cw-check

* fix: remove cachix

* fix: not needed to install/cache Rust in CI

* imp: run CI only on releases and main branch

* nit: on pull_request

* nit: max_history_size as u64

* test: calculate_block_delay

* nit: remove u64::max

* Apply suggestions from code review

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>
---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
  • Loading branch information
3 people authored Oct 13, 2023
1 parent 4ad6973 commit 9569d48
Show file tree
Hide file tree
Showing 26 changed files with 1,737 additions and 72 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Fix compilation issue with Wasm envs because of floats
- Use `serde-json-wasm` dependency instead of `serde-json` for no-floats support
- Add CI test to include CosmWasm compilation check
([/#850](https://github.com/cosmos/ibc-rs/issues/850))
38 changes: 38 additions & 0 deletions .github/workflows/cw-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CosmWasm Compilation Check
on:
pull_request:
paths:
- .github/workflows/cw-check.yml
- ci/cw-check/**

on:
push:
tags:
- v[0-9]+.*
branches:
- 'release/*'
- main
paths:
- .github/workflows/cw-check.yml
- Cargo.toml
- Cargo.lock
- ci/cw-check/**
- crates/**

jobs:
cw-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Run cw-check
run: |
cd ci/cw-check
nix-shell --run "cw-check"
4 changes: 2 additions & 2 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
- .github/workflows/no-std.yml
- Cargo.toml
- Cargo.lock
- ci/**
- ci/no-std-check/**
- crates/**
push:
branches: main
paths:
- .github/workflows/no-std.yml
- Cargo.toml
- Cargo.lock
- ci/**
- ci/no-std-check/**
- crates/**

jobs:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ members = [
]

exclude = [
"ci/cw-check",
"ci/no-std-check",
]
Loading

0 comments on commit 9569d48

Please sign in to comment.