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

Support compiling locally with the new compile service images #10053

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Jul 25, 2024

This adds a new secret flag for compiling targets locally using the compile service docker images. The flag is currently hidden because right now this requires you to have pxt-deployment-config checked out locally; I might in the future duplicate the relevant parts of that repo in this one so that we don't have that restriction.

To test docker images locally:

  • Build the docker file locally
  • Open the pxtarget.json of a target that uses the relevant image (e.g. pxt-microbit for yotta:main and yotta:main-gcc5)
  • If necessary, fix the tag in pxtarget.json to match your locally compiled docker image (e.g. in pxt-microbit, you want to change pext/yotta:gcc5 to pext/yotta:main-gcc5)
  • Set the GITHUB_ACCESS_TOKEN environment variable to a github access token. Note that this token does not need any permissions at all! It's only used to prevent yotta from getting throttled when cloning public repos, so no need to give access to private repos or anything else.
  • Inside the target repo, run:
    rm -rf built/
    pxt buildtarget --localcompileservice
    

The rm -rf above is just to make sure that the local hexcache is cleared. If the hexcache isn't cleared, the docker build might get skipped.

@riknoll riknoll requested a review from a team July 25, 2024 23:09
@riknoll riknoll merged commit 8a199f4 into master Jul 25, 2024
7 checks passed
@riknoll riknoll deleted the dev/riknoll/local-compile-service branch July 25, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants