-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.25 KB
/
matrix-example.yml
File metadata and controls
44 lines (37 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Matrix Job Example for Modal GitHub Runner
#
# This workflow demonstrates how to run matrix jobs on Modal runners.
#
# IMPORTANT: Each matrix job needs a unique label to get its own runner.
# Without unique labels, multiple matrix jobs compete for the same runner
# and get stuck in "queued" state.
#
# The pattern: job-${{ github.run_id }}-${{ strategy.job-index }}
# - github.run_id = unique per workflow run
# - strategy.job-index = unique per matrix entry (0, 1, 2, ...)
# Combined, they guarantee 1:1 binding between job and runner.
name: Matrix Example
on:
workflow_dispatch:
workflow_call:
jobs:
test:
runs-on:
- self-hosted
- modal
- job-${{ github.run_id }}-${{ strategy.job-index }}
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
run: |
python${{ matrix.python-version }} --version || true
echo "Testing with Python ${{ matrix.python-version }}"
- name: Run tests
run: |
echo "Running tests on Python ${{ matrix.python-version }}"
echo "Runner OS: $(uname -s)"
echo "Runner arch: $(uname -m)"