Skip to content

Commit

Permalink
Move fast tests (kernel and internal tests) to sequential execution t…
Browse files Browse the repository at this point in the history
…o speedup CI
  • Loading branch information
Victor-Jung committed Oct 21, 2024
1 parent 63977b0 commit 42f65b5
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 315 deletions.
575 changes: 272 additions & 303 deletions .github/workflows/CI.yml

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions .github/workflows/TestRunnerCortexM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: TestRunnerCortexM
on:
workflow_call:
inputs:
test-name:
test-names:
required: true
type: string

Expand All @@ -21,6 +21,12 @@ jobs:
run: pip install -e .
- name: Run Test
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
python testRunner_cortexm.py -t Tests/${{ inputs.test-name }}
echo "$testNames" | while IFS= read -r testName; do
if [[ -n "$testName" ]]; then
echo "Running test: $testName"
python testRunner_cortexm.py -t Tests/$testName
fi
done
12 changes: 9 additions & 3 deletions .github/workflows/TestRunnerGeneric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: TestRunnerGeneric
on:
workflow_call:
inputs:
test-name:
test-names:
required: true
type: string

jobs:
test-runner-cortexm:
test-runner-generic:
runs-on: ubuntu-22.04
container:
image: ghcr.io/victor-jung/deeploy:main
Expand All @@ -21,6 +21,12 @@ jobs:
run: pip install -e .
- name: Run Test
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
python testRunner_generic.py -t Tests/${{ inputs.test-name }}
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
10 changes: 8 additions & 2 deletions .github/workflows/TestRunnerMempool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: TestRunnerMempool
on:
workflow_call:
inputs:
test-name:
test-names:
required: true
type: string

Expand All @@ -21,6 +21,12 @@ jobs:
run: pip install -e .
- name: Run Test
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
python testRunner_mempool.py -t Tests/${{ inputs.test-name }}
echo "$testNames" | while IFS= read -r testName; do
if [[ -n "$testName" ]]; then
echo "Running test: $testName"
python testRunner_mempool.py -t Tests/$testName
fi
done
10 changes: 8 additions & 2 deletions .github/workflows/TestRunnerSiracusa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: TestRunnerSiracusa
on:
workflow_call:
inputs:
test-name:
test-names:
required: true
type: string
num-cores:
Expand All @@ -30,10 +30,16 @@ jobs:
key: ${{ runner.os }}-ccache
- name: Run Test
run: |
testNames="${{ inputs.test-names }}"
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
source /app/install/pulp-sdk/configs/siracusa.sh
python testRunner_siracusa.py -t Tests/${{ inputs.test-name }} --cores=${{ inputs.num-cores }}
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
shell: bash

61 changes: 61 additions & 0 deletions .github/workflows/TestRunnerTiledSiracusaSequential.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: TestRunnerTiledSiracusaSequential

on:
workflow_call:
inputs:
tests-config:
required: true
type: string
num-cores:
required: false
default: 8
type: number
default-memory-level:
required: false
default: "L2"
type: string
double-buffer:
required: false
default: false
type: boolean

jobs:

test-runner-siracusa-tiled:
runs-on: ubuntu-22.04
container:
image: ghcr.io/victor-jung/deeploy:main
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Deeploy
run: pip install -e .
- name: Install jq
run: apt-get install -y jq
- name: Cache ccache
id: ccache-cache
uses: actions/cache@v4
with:
path: /app/.ccache
key: ${{ runner.os }}-ccache
- name: Run Tests
run: |
cd DeeployTest
echo '${{ inputs.tests-config }}' > tests.json
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
source /app/install/pulp-sdk/configs/siracusa.sh
jq -c '.[]' tests.json | while read test; do
testName=$(echo "$test" | jq -r '.name')
L1_values=$(echo "$test" | jq -r '.L1[]')
for L1_value in $L1_values; do
echo "Running test: $testName with L1: $L1_value"
python testRunner_tiled_siracusa.py -t Tests/$testName --cores=${{ inputs.num-cores }} --l1 $L1_value --defaultMemLevel=${{ inputs.default-memory-level }} ${{ inputs.double-buffer && '--doublebuffer' || '' }}
done
done
shell: bash

6 changes: 3 additions & 3 deletions .github/workflows/TestRunnerTiledSiracusaWithNeureka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:

jobs:

test-runner-siracusa-tiled:
test-runner-siracusa-neureka-tiled:
strategy:
fail-fast: false
matrix:
Expand All @@ -45,11 +45,11 @@ jobs:
- name: Build Deeploy
run: pip install -e .
- name: Cache ccache
id: ccache-cache
id: ccache-cache-neureka
uses: actions/cache@v4
with:
path: /app/.ccache
key: ${{ runner.os }}-ccache
key: ${{ runner.os }}-ccache-neureka
- name: Run Test
run: |
cd DeeployTest
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/TestRunnerTiledSiracusaWithNeurekaSequential.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: TestRunnerTiledSiracusaWithNeurekaSequential

on:
workflow_call:
inputs:
tests-config:
required: true
type: string
num-cores:
required: false
default: 8
type: number
default-memory-level:
required: false
default: "L2"
type: string
double-buffer:
required: false
default: false
type: boolean
neureka-wmem:
required: false
default: false
type: boolean

jobs:

test-runner-siracusa-neureka-tiled:
runs-on: ubuntu-22.04
container:
image: ghcr.io/victor-jung/deeploy:main
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Deeploy
run: pip install -e .
- name: Install jq
run: apt-get install -y jq
- name: Cache ccache
id: ccache-cache
uses: actions/cache@v4
with:
path: /app/.ccache
key: ${{ runner.os }}-ccache
- name: Run Tests
run: |
cd DeeployTest
echo '${{ inputs.tests-config }}' > tests.json
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
source /app/install/pulp-sdk/configs/siracusa.sh
jq -c '.[]' tests.json | while read test; do
testName=$(echo "$test" | jq -r '.name')
L1_values=$(echo "$test" | jq -r '.L1[]')
for L1_value in $L1_values; do
echo "Running test: $testName with L1: $L1_value"
python testRunner_tiled_siracusa_w_neureka.py -t Tests/$testName --cores=${{ inputs.num-cores }} --l1 $L1_value --defaultMemLevel=${{ inputs.default-memory-level }} ${{ inputs.double-buffer && '--doublebuffer' || '' }} ${{ inputs.neureka-wmem && '--neureka-wmem' || '' }}
done
done
shell: bash

0 comments on commit 42f65b5

Please sign in to comment.