-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (79 loc) · 3.42 KB
/
_config.yml
File metadata and controls
95 lines (79 loc) · 3.42 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# Global CI/CD Configuration
#
# This is a reusable workflow config that defines common settings across all workflows.
# Edit this file to control which OS and Python versions to test against.
#
# During development, you can comment out OS/Python versions to speed up CI runs.
#
name: Global Config
on:
workflow_call:
outputs:
# OS matrix - comment out any you don't want to test
os-matrix:
description: "Operating systems to test"
value: ${{ jobs.config.outputs.os-matrix }}
# Python versions - comment out any you don't want to test
python-matrix:
description: "Python versions to test"
value: ${{ jobs.config.outputs.python-matrix }}
# Primary OS/Python for single-runner jobs (coverage, etc.)
primary-os:
description: "Primary OS for single-runner jobs"
value: ${{ jobs.config.outputs.primary-os }}
primary-python:
description: "Primary Python version for single-runner jobs"
value: ${{ jobs.config.outputs.primary-python }}
# Job toggles
enable-tests:
description: "Enable test job"
value: ${{ jobs.config.outputs.enable-tests }}
jobs:
config:
runs-on: ubuntu-latest
outputs:
os-matrix: ${{ steps.set-config.outputs.os-matrix }}
python-matrix: ${{ steps.set-config.outputs.python-matrix }}
primary-os: ${{ steps.set-config.outputs.primary-os }}
primary-python: ${{ steps.set-config.outputs.primary-python }}
enable-tests: ${{ steps.set-config.outputs.enable-tests }}
steps:
- id: set-config
run: |
# ============================================================
# CONFIGURATION - Edit this section
# ============================================================
# Operating Systems to test
# Comment out any OS you want to skip during development
OS_MATRIX='[
"ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel", "windows-latest"
]'
# OS options: "windows-latest", "ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel"
# Python versions to test
PYTHON_MATRIX='[
"3.8", "3.11", "3.14"
]'
# Python versions: "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
# Primary OS and Python for single-runner jobs
PRIMARY_OS="ubuntu-latest"
PRIMARY_PYTHON="3.11"
# Enable/Disable Jobs
# Set to "true" or "false"
ENABLE_TESTS="true"
# ============================================================
# END CONFIGURATION
# ============================================================
# Compact JSON (remove newlines and extra spaces)
OS_MATRIX_COMPACT=$(echo "$OS_MATRIX" | jq -c .)
PYTHON_MATRIX_COMPACT=$(echo "$PYTHON_MATRIX" | jq -c .)
echo "os-matrix=$OS_MATRIX_COMPACT" >> $GITHUB_OUTPUT
echo "python-matrix=$PYTHON_MATRIX_COMPACT" >> $GITHUB_OUTPUT
echo "primary-os=$PRIMARY_OS" >> $GITHUB_OUTPUT
echo "primary-python=$PRIMARY_PYTHON" >> $GITHUB_OUTPUT
echo "enable-tests=$ENABLE_TESTS" >> $GITHUB_OUTPUT
echo "✓ Configuration loaded:"
echo " OS: $OS_MATRIX_COMPACT"
echo " Python: $PYTHON_MATRIX_COMPACT"
echo " Primary: $PRIMARY_OS / $PRIMARY_PYTHON"
echo " Tests: $ENABLE_TESTS"