Skip to content

Commit

Permalink
Merge branch 'master' into feat/unified
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Mar 20, 2024
2 parents 556468b + cf7ef6b commit 9ebc192
Show file tree
Hide file tree
Showing 369 changed files with 1,116 additions and 769 deletions.
63 changes: 56 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cargo install wasm-opt
cargo install twiggy
cargo install --path framework/meta
sc-meta install mx-scenario-go --tag v2.1.0-alpha
Expand All @@ -46,8 +46,7 @@ jobs:
- name: Run the wasm tests
env:
RUSTFLAGS: ""
run:
cargo test --features multiversx-sc-scenario/run-go-tests
run: cargo test --features multiversx-sc-scenario/run-go-tests

- name: Generate the contract report
env:
Expand Down Expand Up @@ -108,8 +107,8 @@ jobs:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Contract comparison'
comment-author: "github-actions[bot]"
body-includes: "Contract comparison"

- name: Create or update the report comment
uses: peter-evans/create-or-update-comment@v2
Expand All @@ -120,6 +119,57 @@ jobs:
body: ${{ steps.template.outputs.result }}
edit-mode: replace

test_coverage:
name: Test Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-12-11

- name: Install prerequisites
run: |
rustup component add llvm-tools-preview
dirname $(find ~/.rustup -name llvm-cov) >> $GITHUB_PATH
echo $(dirname $(find ~/.rustup -name llvm-cov))
# which llvm-cov
# which llvm-profdata
- name: Run tests and generate report
env:
RUSTFLAGS: ""
run: |
./tests-coverage.sh
- name: Upload the report
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage.md

- name: Find the comment containing the report
id: fc
uses: peter-evans/find-comment@v2
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "Coverage Summary"

- name: Create or update the report comment
uses: peter-evans/create-or-update-comment@v2
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: ./coverage.md
edit-mode: replace

rust_test:
name: Rust tests
runs-on: ubuntu-latest
Expand All @@ -132,8 +182,7 @@ jobs:
- name: Run the rust tests
env:
RUSTFLAGS: ""
run:
cargo test
run: cargo test

clippy_check:
name: Clippy linter check
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ sdk/**/Cargo.lock
tools/**/Cargo.lock
vm/**/Cargo.lock

# Profiler outputs
*.profraw
*.profdata
*.coverage

# These are backup files generated by rustfmt
**/*.rs.bk

# VSCode config
# Editors config
.vscode
.zed
.idea

# Others
my-vm-tests.sh
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ They are:
- `multiversx-chain-scenario-format`, in short `scenario-format`, scenario JSON serializer/deserializer, 1 crate.
- `multiversx-sdk`, in short `sdk`, allows communication with the chain(s), 1 crate.


## [sc 0.47.7] - 2024-03-15
- Template bugfix (concerning the interactor).

## [sc 0.47.6] - 2024-03-14
- Template naming bugfix, regarding numbers in the project name.
- Added the interactor to the adder template.

## [sc 0.47.5] - 2024-03-08
- Fixed an issue with `MapMapper` when reading from another contract.
- Got rid of nightly feature `maybe_uninit_uninit_array`/`maybe_uninit_array_assume_init`.
Expand Down
49 changes: 29 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"sdk/scenario-format",

"tools/mxpy-snippet-generator",
"tools/coverage-renderer",

"vm",

Expand Down
4 changes: 2 additions & 2 deletions contracts/benchmarks/large-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ publish = false
path = "src/large_storage.rs"

[dependencies.multiversx-sc]
version = "0.47.5"
version = "0.47.7"
path = "../../../framework/base"

[dev-dependencies.multiversx-sc-scenario]
version = "0.47.5"
version = "0.47.7"
path = "../../../framework/scenario"
2 changes: 1 addition & 1 deletion contracts/benchmarks/large-storage/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ publish = false
path = ".."

[dependencies.multiversx-sc-meta]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/meta"
default-features = false
6 changes: 3 additions & 3 deletions contracts/benchmarks/large-storage/wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/benchmarks/large-storage/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ overflow-checks = false
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/wasm-adapter"

[workspace]
Expand Down
4 changes: 2 additions & 2 deletions contracts/benchmarks/mappers/benchmark-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ publish = false
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/base"

[dev-dependencies.multiversx-sc-scenario]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/scenario"
4 changes: 2 additions & 2 deletions contracts/benchmarks/mappers/linked-list-repeat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ path = "../benchmark-common"


[dependencies.multiversx-sc]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/base"

[dev-dependencies.multiversx-sc-scenario]
version = "0.47.5"
version = "0.47.7"
path = "../../../../framework/scenario"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ publish = false
path = ".."

[dependencies.multiversx-sc-meta]
version = "0.47.5"
version = "0.47.7"
path = "../../../../../framework/meta"
default-features = false

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ overflow-checks = false
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "0.47.5"
version = "0.47.7"
path = "../../../../../framework/wasm-adapter"

[workspace]
Expand Down
Loading

0 comments on commit 9ebc192

Please sign in to comment.