Skip to content

Commit 29b1038

Browse files
committed
Merge remote-tracking branch 'upstream' into merge_passing_indexing_tests
2 parents d45456f + 24828cf commit 29b1038

33 files changed

Lines changed: 667 additions & 691 deletions
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: GH Tests
2+
description: "Run quick or full tests with a single configurable action."
3+
inputs:
4+
mode:
5+
description: "Test mode: quick (only serial), medium (1 and 4 ranks), and full (1 to 4)."
6+
required: false
7+
default: "full"
8+
sha:
9+
description: "Commit SHA to checkout before running tests."
10+
required: false
11+
default: "${{ github.sha }}"
12+
py-version:
13+
description: "Python version for the test run."
14+
required: false
15+
default: "3.14"
16+
mpi:
17+
description: "MPI implementation to install."
18+
required: false
19+
default: "mpich"
20+
pytorch-version:
21+
description: "Pinned torch/torchvision/torchaudio versions."
22+
required: false
23+
default: "torch torchvision torchaudio"
24+
runs:
25+
using: "composite"
26+
steps:
27+
- name: Setup MPI
28+
uses: mpi4py/setup-mpi@dbbb80b116bea57fc1788daf7dbbf7ab3df3a0f1 # v1.4.2
29+
with:
30+
mpi: ${{ inputs.mpi }}
31+
- name: "Set up Python"
32+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
33+
with:
34+
python-version: "${{ inputs.py-version }}"
35+
- name: Install uv and set the Python version
36+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
37+
with:
38+
enable-cache: true
39+
# Installations
40+
- name: Install heat
41+
shell: bash
42+
env:
43+
UV_SYSTEM_PYTHON: 1
44+
run: |
45+
uv pip install ${{ inputs.pytorch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
46+
uv pip install .[dev]
47+
# Running tests
48+
- name: Run serial tests
49+
shell: bash
50+
run: |
51+
mpirun -n 1 pytest -vv
52+
- name: Run tests on 2 ranks
53+
if: ${{ inputs.mode == 'full' || inputs.mode == 'quick' }}
54+
shell: bash
55+
run: |
56+
mpirun -n 2 pytest -vv
57+
- name: Run tests on 3 ranks
58+
if: ${{ inputs.mode == 'full'}}
59+
shell: bash
60+
run: |
61+
mpirun -n 3 pytest -vv
62+
- name: Run tests on 4 ranks
63+
if: ${{ inputs.mode == 'full' || inputs.mode == 'medium' }}
64+
shell: bash
65+
run: |
66+
mpirun -n 4 pytest -vv
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Trigger Codebase Benchmarks
2+
description: "Trigger benchmarks on Codebase for performance testing and analysis."
3+
inputs:
4+
branch:
5+
description: "The branch to trigger benchmarks on. Defaults to 'main'."
6+
required: false
7+
default: "main"
8+
sha:
9+
description: "The commit SHA to trigger benchmarks on. Defaults to the current commit."
10+
required: false
11+
default: "${{ github.sha }}"
12+
pr_number:
13+
description: "The pull request number to trigger benchmarks on. Defaults to the current PR number."
14+
required: false
15+
default: ""
16+
author:
17+
description: "The author of the benchmarks. Defaults to the PR assignee or 'heat_team'."
18+
required: false
19+
default: "${{ github.event.pull_request.assignee.login || 'heat_team' }}"
20+
trigger_token:
21+
description: "The trigger token used to start the Codebase pipeline."
22+
required: true
23+
runs:
24+
using: "composite"
25+
steps:
26+
- name: Trigger benchmarks
27+
shell: bash
28+
env:
29+
AUTHOR: ${{ inputs.author}}
30+
BRANCH: ${{ inputs.branch }}
31+
API_TOKEN: ${{ inputs.trigger_token }}
32+
SHA: ${{ inputs.sha }}
33+
PR_NUMBER: ${{ inputs.pr_number }}
34+
run: |
35+
SHORT_SHA=$(git rev-parse --short $SHA)
36+
curl -s -X POST \
37+
--fail-with-body \
38+
-F "token=$API_TOKEN" \
39+
-F "ref=pipeline/cb/base" \
40+
-F "variables[SHA]=$SHA" \
41+
-F "variables[SHORT_SHA]=${SHORT_SHA}" \
42+
-F "variables[BRANCH]=$BRANCH" \
43+
-F "variables[PR]=$PR_NUMBER" \
44+
-F "variables[AUTHOR]=${AUTHOR}" \
45+
https://codebase.helmholtz.cloud/api/v4/projects/20697/trigger/pipeline
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Trigger Codebase Tests
2+
description: "Trigger tests on Codebase for performance testing and analysis."
3+
inputs:
4+
branch:
5+
description: "The branch to trigger tests on. Defaults to 'main'."
6+
required: false
7+
default: "main"
8+
sha:
9+
description: "The commit SHA to trigger tests on. Defaults to the current commit."
10+
required: false
11+
default: "${{ github.sha }}"
12+
pr_number:
13+
description: "The pull request number to trigger tests on. Defaults to the current PR number."
14+
required: false
15+
default: ""
16+
trigger_token:
17+
description: "The trigger token used to start the Codebase pipeline."
18+
required: true
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Trigger codebase tests
23+
shell: bash
24+
env:
25+
API_TOKEN: ${{ inputs.trigger_token }}
26+
BRANCH: ${{ inputs.branch }}
27+
PR_NUMBER: ${{ inputs.pr_number }}
28+
run: |
29+
curl -s -X POST \
30+
--fail-with-body \
31+
-F "token=$API_TOKEN" \
32+
-F "ref=pipeline/ci/base" \
33+
-F "variables[BRANCH]=$BRANCH" \
34+
-F "variables[PR]=$PR_NUMBER" \
35+
-F "variables[SHA]=${{ inputs.sha }}" \
36+
https://codebase.helmholtz.cloud/api/v4/projects/20697/trigger/pipeline

.github/workflows/CIBase.yml

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

.github/workflows/CISupport.yml

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

.github/workflows/CommentPR.yml

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

.github/workflows/ReceivePR.yml

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

.github/workflows/array-api.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
strategy:
1010
matrix:
1111
python-version: ['3.11', '3.12', '3.13', '3.14']
12-
mpi: [ 'openmpi' ]
12+
mpi: [ 'mpich' ]
1313

1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1717
with:
1818
path: heat
1919
- name: Setup MPI
20-
uses: mpi4py/setup-mpi@3969f247e8fceef153418744f9d9ee6fdaeda29f # v1.2.0
20+
uses: mpi4py/setup-mpi@dbbb80b116bea57fc1788daf7dbbf7ab3df3a0f1 # v1.4.2
2121
with:
2222
mpi: ${{ matrix.mpi }}
2323
- name: Use Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)