diff --git a/.github/workflows/run_long_integration_tests.yml b/.github/workflows/run_long_integration_tests.yml index a230dfc..13f1198 100644 --- a/.github/workflows/run_long_integration_tests.yml +++ b/.github/workflows/run_long_integration_tests.yml @@ -22,7 +22,7 @@ jobs: - name: Build run: | export PYTHONPATH=. - python ./integration_tests/test_previous_builds_are_reproducible.py --selected-builds "a.1" "a.2" "a.3" + python ./integration_tests/test_previous_builds_are_reproducible.py --selected-builds "a.1" "a.2" "a.3" "a.4" - name: Save artifacts uses: actions/upload-artifact@v3 diff --git a/Dockerfile b/Dockerfile index 518a6ec..66922b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:22.04 # Constants -ARG BUILDER_NAME="multiversx/sdk-rust-contract-builder:v4.2.0" +ARG BUILDER_NAME="multiversx/sdk-rust-contract-builder:v4.2.1" ARG VERSION_RUST="nightly-2022-10-16" ARG VERSION_BINARYEN="version_105" ARG DOWNLOAD_URL_BINARYEN="https://github.com/WebAssembly/binaryen/releases/download/${VERSION_BINARYEN}/binaryen-${VERSION_BINARYEN}-x86_64-linux.tar.gz" diff --git a/build_with_docker.py b/build_with_docker.py index a6422ca..e56da1d 100644 --- a/build_with_docker.py +++ b/build_with_docker.py @@ -20,7 +20,7 @@ def main(cli_args: List[str]): parser.add_argument("--packaged-src", type=str, help="source code packaged in a JSON file") parser.add_argument("--contract", type=str) parser.add_argument("--output", type=str, default=Path(os.getcwd()) / "output") - parser.add_argument("--package-whole-project-src", type=bool, default=False, help="include all project files in *.source.json (default: %(default)s)") + parser.add_argument("--package-whole-project-src", action="store_true", default=False, help="include all project files in *.source.json (default: %(default)s)") parser.add_argument("--cargo-target-dir", help="deprecated parameter, not used anymore") parser.add_argument("--no-wasm-opt", action="store_true", default=False, help="do not optimize wasm files after the build (default: %(default)s)") parser.add_argument("--build-root", type=str, required=False, help="root path (within container) for the build (default: %(default)s)") diff --git a/integration_tests/previous_builds.py b/integration_tests/previous_builds.py index 3f0d14c..6106521 100644 --- a/integration_tests/previous_builds.py +++ b/integration_tests/previous_builds.py @@ -60,5 +60,20 @@ def __init__(self, name: str, "safe-price-view": "b5a657445ae74423c60210c88a6fa89b0bd4bdd00d5f06e788e14495bccc34c9" }, docker_image="sdk-rust-contract-builder:next" + ), + PreviousBuild( + name="a.4", + project_archive_url="https://github.com/multiversx/mx-exchange-sc/archive/refs/heads/reproducible-v2.5.2-governance-merkle-tree.zip", + project_relative_path_in_archive="mx-exchange-sc-reproducible-v2.5.2-governance-merkle-tree", + packaged_src_url=None, + contract_name=None, + expected_code_hashes={ + "lkmex-transfer": "49809df9f07839f965f8197721083cf403c3db969ddc47b5940b4ee8b464af92", + "router": "3257d57945736298c96aa23f99ea0fba3b6da01f9d2103d81230d05cff62cb5a", + "pair": "e9f117971963cb3c24b14e2a7698d48c170335af2f5c8167774c48c3c1c654e3", + "locked-token-wrapper": "1d317cfa2bbe22ea1f878f8a32f90712d49f68a01665b86657d36910b430522f", + "safe-price-view": "b5a657445ae74423c60210c88a6fa89b0bd4bdd00d5f06e788e14495bccc34c9" + }, + docker_image="sdk-rust-contract-builder:next" ) ] diff --git a/multiversx_sdk_rust_contract_builder/main.py b/multiversx_sdk_rust_contract_builder/main.py index ebd7c58..08d0dbe 100644 --- a/multiversx_sdk_rust_contract_builder/main.py +++ b/multiversx_sdk_rust_contract_builder/main.py @@ -52,6 +52,9 @@ def main(cli_args: List[str]): packaged = PackagedSourceCode.from_file(packaged_src_path) packaged.unwrap_to_filesystem(HARDCODED_UNWRAP_FOLDER) + if not specific_contract: + specific_contract = packaged.metadata.contract_name + metadata = BuildMetadata.from_env() options = BuildOptions(