-
Notifications
You must be signed in to change notification settings - Fork 32
Several fixes and improvements for CI #115
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
083b0cd
[ci][fix] Export `APP_PID` to $GITHUB_ENV in `integration-quarkus-lan…
orionpapadakis 62fb9bb
[ci][fix] Add permission check for workflow `/rerun` triggers to cont…
orionpapadakis b653629
[ci][fix] Clone Quarkus LangChain4j with shallow depth to optimize ch…
orionpapadakis b5ce0c6
[ci][fix] Minimize redundant export statements by appending to $GITHU…
orionpapadakis e9807f4
[ci][fix] Create a reusable `setup-tornadovm` action to simplify and …
orionpapadakis b313884
[ci][fix] Refactor inference steps by introducing a reusable `run-inf…
orionpapadakis 9e6af04
[ci] Cache `setup-tornadovm` action to optimize cross-workflow run times
orionpapadakis 81a122c
[ci] Parametrize JAVA_HOME setup in ci
orionpapadakis e81d599
[ci][fix] Update `setup-tornadovm` action to use `actions/cache/resto…
orionpapadakis e2a1efd
[ci][fix] Refactor workflows to parameterize TornadoVM root paths per…
orionpapadakis 3e5e90c
[ci] Fix github syntax issues
orionpapadakis 5a48ad4
[ci][fix] Revamp `setup-tornadovm` action to replace cache-based logi…
orionpapadakis b986b1c
[ci] Introduce reusable `setup-java` action to unify and simplify JDK…
orionpapadakis 7d13c88
[ci] Merge integration tests into main ci workflow
orionpapadakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Run Inference | ||
| description: Run one llama-tornado inference pass and write the metrics + sidecar files. | ||
|
|
||
| inputs: | ||
| backend: | ||
| description: 'GPU backend (opencl or ptx)' | ||
| required: true | ||
| model_file: | ||
| description: 'Model filename inside $MODELS_DIR (e.g. Llama-3.2-1B-Instruct-F16.gguf)' | ||
| required: true | ||
| model: | ||
| description: 'Human-readable model name for the sidecar (e.g. Llama-3.2-1B-Instruct)' | ||
| required: true | ||
| quantization: | ||
| description: 'Quantization type (e.g. F16, Q8_0)' | ||
| required: true | ||
| configuration: | ||
| description: 'Configuration key for the sidecar (e.g. standard, prefill-decode)' | ||
| required: true | ||
| flags: | ||
| description: 'Extra CLI flags passed to llama-tornado (omit for standard run)' | ||
| required: false | ||
| default: '' | ||
| metrics_file: | ||
| description: 'Absolute path for the output metrics JSON file' | ||
| required: true | ||
| prompt: | ||
| description: 'Prompt to pass to the model' | ||
| required: false | ||
| default: 'Say hello' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Run inference | ||
| shell: bash | ||
| working-directory: ${{ github.workspace }} | ||
| env: | ||
| JAVA_TOOL_OPTIONS: >- | ||
| -Dllama.metrics.format=json | ||
| -Dllama.metrics.output=file | ||
| -Dllama.metrics.file=${{ inputs.metrics_file }} | ||
| METRICS_FILE: ${{ inputs.metrics_file }} | ||
| run: | | ||
| # Run inference and emit raw metrics JSON via JAVA_TOOL_OPTIONS | ||
| ./llama-tornado --gpu --${{ inputs.backend }} \ | ||
| --model $MODELS_DIR/${{ inputs.model_file }} \ | ||
| --prompt "${{ inputs.prompt }}" \ | ||
| ${{ inputs.flags }} | ||
|
|
||
| # Write metadata sidecar so process_metrics.py can identify each metrics file | ||
| SIDECAR="${METRICS_FILE%.json}.meta.json" | ||
| python3 scripts/write_metrics_sidecar.py \ | ||
| --out "$SIDECAR" \ | ||
| backend="${{ inputs.backend }}" \ | ||
| task=llama-inference \ | ||
| model_file=${{ inputs.model_file }} \ | ||
| model=${{ inputs.model }} \ | ||
| quantization=${{ inputs.quantization }} \ | ||
| configuration=${{ inputs.configuration }} \ | ||
| "flags=${{ inputs.flags }}" \ | ||
| prompt="${{ inputs.prompt }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Setup Java | ||
| description: Install and activate a JDK via SDKMAN. Exports JAVA_HOME and updates PATH. | ||
|
|
||
| inputs: | ||
| java_version: | ||
| description: 'SDKMAN Java version identifier (e.g. 21.0.2-open)' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Set up Java with SDKMAN | ||
| shell: bash | ||
| run: | | ||
| source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
| if ! sdk list java | grep -q "${{ inputs.java_version }}"; then | ||
| sdk install java "${{ inputs.java_version }}" | ||
| fi | ||
| sdk use java "${{ inputs.java_version }}" | ||
| echo "JAVA_HOME=$HOME/.sdkman/candidates/java/current" >> $GITHUB_ENV | ||
| echo "$HOME/.sdkman/candidates/java/current/bin" >> $GITHUB_PATH | ||
| java -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Setup TornadoVM | ||
| description: Build TornadoVM once per backend and reuse across runs via a local SHA sentinel. Exports TORNADOVM_HOME and updates PATH for all subsequent steps. | ||
|
|
||
| inputs: | ||
| backend: | ||
| description: 'TornadoVM backend to build (opencl or ptx)' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Get TornadoVM HEAD SHA | ||
| id: tornado_sha | ||
| shell: bash | ||
| run: | | ||
| SHA=$(git ls-remote https://github.com/beehive-lab/TornadoVM HEAD | cut -f1) | ||
| echo "sha=$SHA" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Check local build sentinel | ||
| id: sentinel | ||
| shell: bash | ||
| run: | | ||
| SENTINEL="$TORNADO_ROOT/.built-sha" | ||
| if [ -f "$SENTINEL" ] && [ "$(cat $SENTINEL)" = "${{ steps.tornado_sha.outputs.sha }}" ]; then | ||
| echo "up-to-date=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "up-to-date=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Clone TornadoVM master | ||
| if: steps.sentinel.outputs.up-to-date != 'true' | ||
| shell: bash | ||
| run: | | ||
| rm -rf $TORNADO_ROOT | ||
| git clone --depth 1 --branch master \ | ||
| https://github.com/beehive-lab/TornadoVM.git \ | ||
| $TORNADO_ROOT | ||
|
|
||
| - name: Set up Python venv for TornadoVM | ||
| if: steps.sentinel.outputs.up-to-date != 'true' | ||
| shell: bash | ||
| run: | | ||
| python3 -m venv $TORNADO_ROOT/venv | ||
| source $TORNADO_ROOT/venv/bin/activate | ||
| python --version | ||
|
|
||
| - name: Build TornadoVM | ||
| if: steps.sentinel.outputs.up-to-date != 'true' | ||
| shell: bash | ||
| run: | | ||
| cd $TORNADO_ROOT | ||
| mkdir -p graalJars && cp $GRAAL_JARS/* graalJars/ | ||
| source venv/bin/activate | ||
| echo "=== Building TornadoVM ===" | ||
| make BACKEND=${{ inputs.backend }} | ||
| echo "${{ steps.tornado_sha.outputs.sha }}" > .built-sha | ||
|
|
||
| - name: Find TornadoVM SDK directory | ||
| id: find_sdk | ||
| shell: bash | ||
| run: | | ||
| SDK_DIR=$(find $TORNADO_ROOT/dist -type d -maxdepth 3 -path "*/tornadovm-*-${{ inputs.backend }}" | head -n 1) | ||
| if [ -z "$SDK_DIR" ]; then | ||
| echo "::error::Could not locate TornadoVM SDK directory!" | ||
| find $TORNADO_ROOT/dist -maxdepth 5 -type d | ||
| exit 1 | ||
| fi | ||
| echo "sdk_dir=$SDK_DIR" >> $GITHUB_OUTPUT | ||
|
|
||
| # Runs on both fresh build and sentinel hit — sets TORNADOVM_HOME and PATH | ||
| # for all subsequent steps in the calling workflow. | ||
| - name: Configure TornadoVM environment | ||
| shell: bash | ||
| run: | | ||
| FULL_SDK="${{ steps.find_sdk.outputs.sdk_dir }}" | ||
| echo "Detected TornadoVM SDK: $FULL_SDK" | ||
| echo "TORNADOVM_HOME=$FULL_SDK" >> $GITHUB_ENV | ||
| echo "$FULL_SDK/bin" >> $GITHUB_PATH | ||
| echo "$JAVA_HOME/bin" >> $GITHUB_PATH | ||
| which tornado || { echo "::error::tornado not in PATH"; exit 1; } | ||
| tornado --devices | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.