Skip to content

Commit dbf2a2f

Browse files
committed
Add level for each monitor
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
1 parent 53e1f8b commit dbf2a2f

File tree

7 files changed

+66
-88
lines changed

7 files changed

+66
-88
lines changed

.github/workflows/separate_frameworks.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,15 @@ jobs:
4343
echo "Frameworks to build: ${{ steps.filter.outputs.frameworks }}"
4444
echo "frameworks json: ${{ steps.filter.outputs.frameworks_json }}"
4545
46-
for-KVM-based-monitors:
47-
name: Build changed apps
46+
for-each-framework:
47+
name: Find the monitors for ${{ inputs.app }} and each framework
4848
needs: get-frameworks
49-
if: |
50-
needs.get-frameworks.outputs.frameworks != '' &&
51-
contains(needs.get-frameworks.outputs.frameworks, 'unikraft')
5249
strategy:
5350
fail-fast: false
5451
matrix:
55-
monitor: [qemu, firecracker]
56-
##apps: ${{ fromJSON(needs.get-chnaged-files.outputs.apps) }}
57-
uses: ./.github/workflows/build_and_manifest.yml
52+
framework: ${{ fromJSON(needs.get-frameworks.outputs.frameworks) }}
53+
uses: ./.github/workflows/separate_monitors.yml
5854
with:
59-
monitor: ${{ matrix.monitor }}
55+
app: ${{ inputs.app }}
56+
framework: ${{ matrix.framework }}
57+
framework_object: ${{ needs.get-frameworks.outputs.frameworks_json }}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Find the target monitors to build for an application and framework
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
app:
7+
description: "The target application to build"
8+
type: string
9+
required: true
10+
framework:
11+
description: "The target framework to build against"
12+
type: string
13+
required: true
14+
frameworks_json:
15+
description: "The JSON object with all changed files for app and framework"
16+
type: string
17+
required: true
18+
19+
jobs:
20+
get-monitors:
21+
runs-on: ubuntu-22.04
22+
outputs:
23+
monitors: ${{ steps.filter.outputs.monitors }}
24+
monitors_json: ${{ steps.filter.outputs.monitors_json }}
25+
steps:
26+
- name: Show input
27+
run: |
28+
echo "Input app: ${{ inputs.app }}"
29+
echo "Input framework: ${{ inputs.framework }}"
30+
echo "Input json: ${{ inputs.frameworks_json }}"
31+
32+
- name: Get monitors to build against
33+
id: filter
34+
run: |
35+
FRAMEWORK=${{ inputs.framework }}
36+
MONITORS_JSON=$(echo '${{ inputs.frameworks_json }}' | \
37+
jq -c --arg framework "$FRAMEWORK" '.[$framework]'
38+
)
39+
MONITORS=$(echo '${{ inputs.frameworks_json }}' | \
40+
jq -c --arg framework "$FRAMEWORK" '.[$framework] | keys'
41+
)
42+
echo "monitors=$MONITORS" >> "$GITHUB_OUTPUT"
43+
echo "monitors_json=$MONITORS_JSON" >> "$GITHUB_OUTPUT"
44+
45+
- name: Show changed files
46+
run: |
47+
echo "Build for monitors: ${{ steps.filter.outputs.monitors }}"
48+
echo "MOnitors json: ${{ steps.filter.outputs.monitors_json }}"
49+
50+
for-each-monitor:
51+
name: Build changed apps
52+
needs: get-monitors
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
monitor: ${{ fromJSON(needs.get-monitors.outputs.monitors) }}
57+
uses: ./.github/workflows/build_and_manifest.yml
58+
with:
59+
monitor: ${{ matrix.monitor }}

hello-world/rumprun/Makefile

Lines changed: 0 additions & 23 deletions
This file was deleted.

hello-world/rumprun/bunnyfile-hvt-amd64

Lines changed: 0 additions & 14 deletions
This file was deleted.

hello-world/rumprun/bunnyfile-hvt-arm64

Lines changed: 0 additions & 14 deletions
This file was deleted.

hello-world/rumprun/bunnyfile-spt-amd64

Lines changed: 0 additions & 14 deletions
This file was deleted.

hello-world/rumprun/bunnyfile-spt-arm64

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)