Skip to content
Draft
Show file tree
Hide file tree
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
12 changes: 3 additions & 9 deletions .github/workflows/_runner-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: _runner-generic
docker-image:
required: true
type: string
test-names:
pytest-marker:
required: true
type: string

Expand All @@ -36,16 +36,10 @@ jobs:
with:
path: /app/.ccache
key: ccache-ci
- name: Run Test
- name: Run Test # VJUNG: Run tests with 4 parallel threads as GitHub action VM has 4 cores.
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
echo "$testNames" | while IFS= read -r testName; do
if [[ -n "$testName" ]]; then
echo "Running test: $testName"
python testRunner_generic.py -t Tests/$testName
fi
done
pytest test_platforms.py -v -n 4 -m "generic and ${{ inputs.pytest-marker }}"
shell: bash
45 changes: 45 additions & 0 deletions .github/workflows/_runner-siracusa-tiled-kernels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-FileCopyrightText: 2024 ETH Zurich and University of Bologna
#
# SPDX-License-Identifier: Apache-2.0

---
name: Siracusa Tiled Kernels Runner

on:
workflow_call:
inputs:
runner:
required: true
type: string
docker-image:
required: true
type: string
memory-level:
required: true
type: string
description: 'Memory level marker (l2 or l3)'
buffer-mode:
required: true
type: string
description: 'Buffer mode marker (singlebuffer or doublebuffer)'

jobs:
run-tests:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.docker-image }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Deeploy
run: |
pip install -e .

- name: Run kernel tests
run: |
cd DeeployTest
pytest test_platforms.py -m "siracusa_tiled and kernels and ${{ inputs.memory-level }} and ${{ inputs.buffer-mode }}" -v
54 changes: 54 additions & 0 deletions .github/workflows/_runner-siracusa-tiled-models.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: 2024 ETH Zurich and University of Bologna
#
# SPDX-License-Identifier: Apache-2.0

---
name: Siracusa Tiled Models Runner

on:
workflow_call:
inputs:
runner:
required: true
type: string
docker-image:
required: true
type: string
test-name:
required: true
type: string
description: 'Test name to run'
memory-level:
required: true
type: string
description: 'Memory level marker (l2 or l3)'
buffer-mode:
required: true
type: string
description: 'Buffer mode marker (singlebuffer or doublebuffer)'

jobs:
run-test:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.docker-image }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Deeploy
run: |
pip install -e .

- name: Run model test with retry
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 3
retry_on: error
command: |
cd DeeployTest
pytest test_platforms.py -k "${{ inputs.test-name }}-" -m "siracusa_tiled and models and ${{ inputs.memory-level }} and ${{ inputs.buffer-mode }}" -v
79 changes: 0 additions & 79 deletions .github/workflows/_runner-siracusa-tiled-sequential.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/_runner-siracusa-tiled.yml

This file was deleted.

16 changes: 5 additions & 11 deletions .github/workflows/_runner-siracusa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ name: _runner-siracusa
docker-image:
required: true
type: string
test-names:
test-type:
required: true
type: string
num-cores:
required: true
type: number
description: "Type of tests to run: kernels or models"

jobs:
test-runner-siracusa:
Expand All @@ -41,14 +39,10 @@ jobs:
key: ccache-ci
- name: Run Test
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
echo "$testNames" | while IFS= read -r testName; do
if [[ -n "$testName" ]]; then
echo "Running test: $testName"
python testRunner_siracusa.py -t Tests/$testName --cores=${{ inputs.num-cores }}
fi
done

# Run tests using pytest markers
pytest test_platforms.py::test_siracusa_${{ inputs.test-type }} -v -s
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/_select-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
elif [[ "${{ github.ref_name }}" == "main" ]]; then
IMAGE="ghcr.io/pulp-platform/deeploy:main"
else
IMAGE="ghcr.io/pulp-platform/deeploy:devel"
IMAGE="ghcr.io/victor-jung/deeploy:pytest-migration"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only draft, but don't forget this hard-coded path :)

fi
echo "image=${IMAGE}" >> "$GITHUB_OUTPUT"

Expand Down
Loading
Loading