Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "package_whole_project_src" #24

Merged
merged 5 commits into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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