-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1665 from multiversx/dmerge3
Merge `rc/v0.51` to `feat/managed-decimal`
- Loading branch information
Showing
1,452 changed files
with
47,587 additions
and
13,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
contracts: | ||
name: Contracts (nightly) | ||
uses: multiversx/mx-sc-actions/.github/workflows/[email protected] | ||
with: | ||
rust-toolchain: nightly-2024-05-22 | ||
path-to-sc-meta: framework/meta | ||
enable-contracts-size-report: false | ||
mx-scenario-go-version: v2.1.0-alpha | ||
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,190 +12,13 @@ permissions: | |
pull-requests: write | ||
|
||
jobs: | ||
wasm_test: | ||
name: Wasm tests | ||
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 | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Install prerequisites | ||
run: | | ||
pipx install multiversx-sdk-cli==v9.3.1 | ||
cargo install wasm-opt | ||
cargo install twiggy | ||
cargo install --path framework/meta | ||
sc-meta install mx-scenario-go --tag v2.1.0-alpha | ||
which mxpy | ||
which wasm-opt | ||
which mx-scenario-go | ||
- name: Build the wasm contracts | ||
env: | ||
RUSTFLAGS: "" | ||
run: sc-meta all build --no-imports --target-dir $(pwd)/target --path . | ||
|
||
- name: Run the wasm tests | ||
env: | ||
RUSTFLAGS: "" | ||
run: cargo test --features multiversx-sc-scenario/run-go-tests | ||
|
||
- name: Generate the contract report | ||
env: | ||
RUSTFLAGS: "" | ||
run: | | ||
sc-meta all build-dbg --twiggy-paths --target-dir $(pwd)/target --path . | ||
mxpy contract report --skip-build --skip-twiggy --output-format json --output-file report.json | ||
- name: Upload the report json | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: report | ||
path: report.json | ||
|
||
- name: Download the base report | ||
uses: dawidd6/action-download-artifact@v2 | ||
if: github.event_name == 'pull_request' | ||
continue-on-error: true | ||
with: | ||
workflow: actions.yml | ||
name: report | ||
commit: ${{ github.event.pull_request.base.sha }} | ||
path: base-report | ||
|
||
- name: Generate the report template | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
echo "Contract comparison - from {{ .base }} to {{ .head }}" > report.md | ||
if [ ! -f base-report/report.json ] | ||
then | ||
echo ":warning: Warning: Could not download the report for the base branch. Displaying only the report for the current branch. :warning:" >> report.md | ||
mxpy contract report --compare report.json --output-format github-markdown --output-file report-table.md | ||
else | ||
mxpy contract report --compare base-report/report.json report.json --output-format github-markdown --output-file report-table.md | ||
fi | ||
cat report-table.md >> report.md | ||
- name: Render the report from the template | ||
id: template | ||
uses: chuhlomin/render-template@v1 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
template: report.md | ||
vars: | | ||
base: ${{ github.event.pull_request.base.sha }} | ||
head: ${{ github.event.pull_request.head.sha }} | ||
- name: Upload the report markdown | ||
uses: actions/upload-artifact@v3 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
name: report-markdown | ||
path: report.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: "Contract comparison" | ||
|
||
- 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: ${{ 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 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: nightly-2023-12-11 | ||
|
||
- name: Run the rust tests | ||
env: | ||
RUSTFLAGS: "" | ||
run: cargo test | ||
|
||
clippy_check: | ||
name: Clippy linter check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: nightly-2023-12-11 | ||
components: clippy | ||
- uses: giraffate/clippy-action@v1 | ||
env: | ||
RUSTFLAGS: "" | ||
with: | ||
github_token: ${{ github.token }} | ||
clippy_flags: --all-targets --all-features | ||
contracts: | ||
name: Contracts | ||
uses: multiversx/mx-sc-actions/.github/workflows/[email protected] | ||
with: | ||
rust-toolchain: stable | ||
path-to-sc-meta: framework/meta | ||
mx-scenario-go-version: v2.1.0-alpha | ||
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- uses: actions-rs/toolchain@v1 | ||
with: | ||
default: true | ||
toolchain: nightly-2023-12-11 | ||
toolchain: stable | ||
|
||
- name: Download vscode-lldb | ||
uses: robinraju/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
proxy_compare: | ||
name: Proxy compare - newly generated vs present in file tree | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
default: true | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Install prerequisites | ||
run: | | ||
cargo install --path framework/meta | ||
- name: Run proxy compare | ||
run: | | ||
cd contracts | ||
sc-meta all proxy --compare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.