Skip to content

Commit

Permalink
examples/demo.py: expose CCACHE
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Sep 26, 2024
1 parent 1f5998c commit 6b70f78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Run the demo
run: |
source .venv/bin/activate
VERBOSE=${{ github.event.inputs.verbose }} PROGESS=${{ github.event.inputs.progress }} CLONE_DEPTH=${{ github.event.inputs.clone_depth }} BUILD_CONFIG=${{ github.event.inputs.build_config }} IGNORE_ERROR=${{ github.event.inputs.ignore_error }} TEST=${{ github.event.inputs.test }} INSTALL=${{ github.event.inputs.install }} DEPLOY=${{ github.event.inputs.deploy }} EXPORT=${{ github.event.inputs.export }} DEST=/tmp/seal5_llvm ${{ steps.ctx.outputs.program }} examples/${{ github.event.inputs.script }}
VERBOSE=${{ github.event.inputs.verbose }} PROGRESS=${{ github.event.inputs.progress }} CCACHE=${{ github.event.inputs.ccache }} CLONE_DEPTH=${{ github.event.inputs.clone_depth }} BUILD_CONFIG=${{ github.event.inputs.build_config }} IGNORE_ERROR=${{ github.event.inputs.ignore_error }} TEST=${{ github.event.inputs.test }} INSTALL=${{ github.event.inputs.install }} DEPLOY=${{ github.event.inputs.deploy }} EXPORT=${{ github.event.inputs.export }} DEST=/tmp/seal5_llvm ${{ steps.ctx.outputs.program }} examples/${{ github.event.inputs.script }}
- uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.export == '1' }}"
with:
Expand Down
5 changes: 3 additions & 2 deletions examples/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
EXPORT = bool(int(os.environ.get("EXPORT", 1)))
CLEANUP = bool(int(os.environ.get("CLEANUP", 0)))
PROGRESS = bool(int(os.environ.get("PROGRESS", 1)))
CCACHE = bool(int(os.environ.get("CCACHE", 0)))
CLONE_DEPTH = bool(int(os.environ.get("CLONE_DEPTH", 1)))
DEST_DIR = os.environ.get("DEST_DIR", "/tmp")
DEST = os.environ.get("DEST", DEST_DIR + "/seal5_llvm_demo").rstrip("/")
Expand Down Expand Up @@ -109,7 +110,7 @@
seal5_flow.patch(verbose=VERBOSE, stages=[PatchStage.PHASE_0])

# Build initial LLVM
seal5_flow.build(verbose=VERBOSE, config=BUILD_CONFIG)
seal5_flow.build(verbose=VERBOSE, config=BUILD_CONFIG, enable_ccache=CCACHE)

# Transform inputs
# 1. Create M2-ISA-R metamodel
Expand Down Expand Up @@ -146,7 +147,7 @@

if INSTALL:
# Install final LLVM
seal5_flow.install(verbose=VERBOSE, config=BUILD_CONFIG)
seal5_flow.install(verbose=VERBOSE, config=BUILD_CONFIG, enable_ccache=CCACHE)

if DEPLOY:
# Deploy patched LLVM (export sources)
Expand Down

0 comments on commit 6b70f78

Please sign in to comment.