-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (97 loc) · 3.13 KB
/
Copy pathvariants.yml
File metadata and controls
106 lines (97 loc) · 3.13 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
96
97
98
99
100
101
102
103
104
105
106
name: Python/VENV/Installer Variants
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
pip-variant:
strategy:
fail-fast: false
matrix:
# lowest and highest supported versions
python-version: ["3.10", "3.14"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Switch project Makefile to the pip variant
run: |
python -m pip install -e .
sed -i.bak 's/^#: core.mxenv-uv/#: core.mxenv-pip/' Makefile && rm -f Makefile.bak
mxmake update
- name: VENV created with pip
run: |
make VENV_ENABLED=true VENV_CREATE=true PRIMARY_PYTHON=python3 test
make clean
- name: VENV pre-installed with pip
run: |
python -m venv existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PRIMARY_PYTHON=python3 test
make clean
rm -r existingvenv
- name: Global Python with pip
run: |
make VENV_ENABLED=false VENV_CREATE=false PRIMARY_PYTHON=python3 test
make clean
uv-variant:
strategy:
fail-fast: false
matrix:
# lowest and highest supported versions
python-version: ["3.10", "3.14"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: VENV created with uv
run: |
make VENV_ENABLED=true VENV_CREATE=true PRIMARY_PYTHON=python3 UV_PYTHON=${{ matrix.python-version }} test
make clean
- name: VENV pre-installed with uv
run: |
uv venv -p ${{ matrix.python-version }} --seed existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv UV_PYTHON=${{ matrix.python-version }} test
make clean
rm -r existingvenv
uv-only:
name: UV-only (no Python) - Python ${{ matrix.uv-python }}
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
strategy:
fail-fast: false
matrix:
uv-python: ["3.10", "3.14"]
steps:
- name: Install system dependencies (NOT Python)
run: |
apt-get update
apt-get install -y make curl ca-certificates git
- uses: actions/checkout@v6
- name: Install UV globally
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Verify NO Python installed
run: |
! which python3 || (echo "ERROR: Python found!" && exit 1)
! which python || (echo "ERROR: Python found!" && exit 1)
- name: Run make install with UV only
run: make UV_PYTHON=${{ matrix.uv-python }} install
- name: Verify venv created with correct Python version
run: |
.venv/bin/python --version
.venv/bin/python --version | grep "${{ matrix.uv-python }}"