Skip to content

Commit

Permalink
Merge pull request #24 from multiversx/support-whole-package-src
Browse files Browse the repository at this point in the history
Add support for "package_whole_project_src"
  • Loading branch information
andreibancioiu authored Dec 27, 2023
2 parents 82c4333 + c1e0771 commit 59f5465
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/reproducible-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
skip_preliminary_checks:
type: boolean
description: Skip preliminary checks. Never set this in production!
package_whole_project_src:
type: boolean
description: Include all project files in the packaged source (*.source.json)

jobs:
build:
Expand All @@ -45,13 +48,15 @@ jobs:
create_release = os.getenv("create_release", "").lower() == "true"
attach_to_existing_release = os.getenv("attach_to_existing_release", "").lower() == "true"
skip_preliminary_checks = os.getenv("skip_preliminary_checks", "").lower() == "true"
package_whole_project_src = os.getenv("package_whole_project_src", "").lower() == "true"
logging.info(f"Image tag: {image_tag}")
logging.info(f"Project path: {project_path}")
logging.info(f"Contract name: {contract_name or '*'}")
logging.info(f"Create new release: {create_release}")
logging.info(f"Attach output to existing release: {attach_to_existing_release}")
logging.info(f"Skip preliminary checks: {skip_preliminary_checks}")
logging.info(f"Package whole project src: {package_whole_project_src}")
if skip_preliminary_checks:
logging.warning("You should never set 'skip_preliminary_checks', unless you really know what you are doing!")
Expand All @@ -72,6 +77,7 @@ jobs:
create_release: ${{ inputs.create_release }}
attach_to_existing_release: ${{ inputs.attach_to_existing_release }}
skip_preliminary_checks: ${{ inputs.skip_preliminary_checks }}
package_whole_project_src: ${{ inputs.package_whole_project_src }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -117,7 +123,12 @@ jobs:
- name: Build contracts
run: |
python3 ./build_with_docker.py --no-docker-tty --image=multiversx/sdk-rust-contract-builder:${{ inputs.image_tag }} --project=${{ inputs.project_path }} --contract=${{ inputs.contract_name }} --output=/home/runner/work/output-from-docker
flag_package_whole_project_src=""
if ${{ inputs.package_whole_project_src }}; then
flag_package_whole_project_src="--package-whole-project-src"
fi
python3 ./build_with_docker.py --no-docker-tty --image=multiversx/sdk-rust-contract-builder:${{ inputs.image_tag }} --project=${{ inputs.project_path }} --contract=${{ inputs.contract_name }} --output=/home/runner/work/output-from-docker ${flag_package_whole_project_src}
- name: Save artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 59f5465

Please sign in to comment.