Skip to content

Commit c5527fa

Browse files
authored
Update cross-platform-build-verification.yml
Signed-off-by: 1minds3t <1minds3t@proton.me>
1 parent bf64f57 commit c5527fa

1 file changed

Lines changed: 59 additions & 52 deletions

File tree

.github/workflows/cross-platform-build-verification.yml

Lines changed: 59 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -46,66 +46,73 @@ jobs:
4646
echo "arch=$ARCH" >> $GITHUB_OUTPUT
4747
echo "os=$OS" >> $GITHUB_OUTPUT
4848
49-
- name: Build and Test
49+
- name: Build and Test (Self-Hosted Linux)
50+
if: contains(matrix.runner, 'self-hosted') && contains(matrix.runner, 'linux')
5051
shell: bash
5152
env:
5253
PYTHONUNBUFFERED: "1"
5354
run: |
5455
set -x
5556
56-
# LINUX SELF-HOSTED: Use working diagnostic approach
57-
if [[ "${{ matrix.runner }}" == *"self-hosted"* ]] && [[ "${{ matrix.runner }}" == *"linux"* ]]; then
58-
if [ -f "$HOME/miniconda3/envs/evocoder_env/bin/python3.11" ]; then
59-
PY="$HOME/miniconda3/envs/evocoder_env/bin/python3.11"
60-
elif [ -f "/usr/bin/python3.11" ]; then
61-
PY=/usr/bin/python3.11
62-
elif [ -f "/usr/bin/python3.12" ]; then
63-
PY=/usr/bin/python3.12
64-
else
65-
echo "❌ No suitable Python found"
66-
exit 1
67-
fi
68-
69-
$PY --version
70-
71-
echo "🔥 Installing pip and build"
72-
$PY -m pip install --user --upgrade pip build || {
73-
curl -sS https://bootstrap.pypa.io/get-pip.py | $PY - --user
74-
$PY -m pip install --user --upgrade pip build
75-
}
76-
77-
echo "Building package..."
78-
$PY -m build
79-
80-
echo "Installing package..."
81-
$PY -m pip install --user --force-reinstall dist/*.whl
82-
83-
echo "Testing installation..."
84-
export PATH="$HOME/.local/bin:$PATH"
85-
omnipkg --version
86-
8pkg --version
87-
omnipkg list
88-
89-
# ALL OTHER PLATFORMS: Use venv approach
57+
if [ -f "$HOME/miniconda3/envs/evocoder_env/bin/python3.11" ]; then
58+
PY="$HOME/miniconda3/envs/evocoder_env/bin/python3.11"
59+
echo "🎯 Using conda env native Python 3.11: $PY"
60+
elif [ -f "/usr/bin/python3.11" ]; then
61+
PY=/usr/bin/python3.11
62+
echo "🎯 Using system Python 3.11: $PY"
63+
elif [ -f "/usr/bin/python3.12" ]; then
64+
PY=/usr/bin/python3.12
65+
echo "🎯 Using system Python 3.12: $PY"
9066
else
91-
if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
92-
93-
if ! $PY -m venv .venv; then
94-
echo "⚠️ Standard venv failed. Retrying with --without-pip..."
95-
$PY -m venv .venv --without-pip
96-
curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python
97-
fi
98-
99-
if [ -f ".venv/bin/activate" ]; then source .venv/bin/activate; else source .venv/Scripts/activate; fi
100-
101-
python -m pip install --upgrade pip build
102-
python -m build
103-
pip install dist/*.whl
104-
105-
omnipkg --version
106-
8pkg --version
107-
omnipkg list
67+
echo "❌ No suitable Python found"
68+
exit 1
10869
fi
70+
71+
$PY --version
72+
73+
echo "🔥 Installing pip and build"
74+
$PY -m pip install --user --upgrade pip build || {
75+
echo "❌ Failed. Trying bootstrap..."
76+
curl -sS https://bootstrap.pypa.io/get-pip.py | $PY - --user
77+
$PY -m pip install --user --upgrade pip build
78+
}
79+
80+
echo "Building package..."
81+
$PY -m build
82+
83+
echo "Installing package..."
84+
$PY -m pip install --user --force-reinstall dist/*.whl
85+
86+
echo "Testing installation..."
87+
export PATH="$HOME/.local/bin:$PATH"
88+
omnipkg --version
89+
8pkg --version
90+
omnipkg list
91+
92+
- name: Build and Test (Other Platforms)
93+
if: ${{ !(contains(matrix.runner, 'self-hosted') && contains(matrix.runner, 'linux')) }}
94+
shell: bash
95+
env:
96+
PYTHONUNBUFFERED: "1"
97+
run: |
98+
set -x
99+
if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
100+
101+
if ! $PY -m venv .venv; then
102+
echo "⚠️ Standard venv failed. Retrying with --without-pip..."
103+
$PY -m venv .venv --without-pip
104+
curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python
105+
fi
106+
107+
if [ -f ".venv/bin/activate" ]; then source .venv/bin/activate; else source .venv/Scripts/activate; fi
108+
109+
python -m pip install --upgrade pip build
110+
python -m build
111+
pip install dist/*.whl
112+
113+
omnipkg --version
114+
8pkg --version
115+
omnipkg list
109116
110117
# ═══════════════════════════════════════════════════════════════════
111118
# 2. CRITICAL TESTS

0 commit comments

Comments
 (0)