ci: 시놀로지 설치 경로 직접 참조로 변경 (설치 단계 제거)
- Python: /usr/bin/python3 (3.8.12) 고정 사용 - Node.js: /usr/local/bin 을 PATH에 추가 (v18.18.2 appstore 설치) - Python deps: /volume1/gitea/python_venv 영구 venv로 최초 1회만 설치 - 이후 CI 실행은 venv 재사용 → pip 재설치 단계 불필요 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+26
-17
@@ -9,6 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
validate-and-build:
|
validate-and-build:
|
||||||
# Synology NAS act_runner: host-based 실행 (Docker 불필요)
|
# Synology NAS act_runner: host-based 실행 (Docker 불필요)
|
||||||
|
# Python: /usr/bin/python3 (3.8.12), Node.js: /usr/local/bin/node (v18.18.2)
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -23,25 +24,33 @@ jobs:
|
|||||||
git fetch origin ${{ github.sha }} --depth=1
|
git fetch origin ${{ github.sha }} --depth=1
|
||||||
git reset --hard FETCH_HEAD
|
git reset --hard FETCH_HEAD
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
- name: Configure Runtime Paths
|
||||||
env:
|
|
||||||
SETUPTOOLS_USE_DISTUTILS: stdlib
|
|
||||||
run: |
|
run: |
|
||||||
if ! python3 -m pip --version >/dev/null 2>&1; then
|
# Node.js 18은 /usr/local/bin에 설치됨 (appstore) — PATH에 추가
|
||||||
curl -sS https://bootstrap.pypa.io/pip/3.8/get-pip.py -o get-pip.py
|
echo "/usr/local/bin" >> $GITHUB_PATH
|
||||||
python3 get-pip.py --user --quiet
|
echo "=== 런타임 버전 확인 ==="
|
||||||
rm get-pip.py
|
/usr/bin/python3 --version
|
||||||
|
/usr/local/bin/node --version
|
||||||
|
/usr/local/bin/npm --version
|
||||||
|
|
||||||
|
- name: Setup Python Environment
|
||||||
|
run: |
|
||||||
|
VENV=/volume1/gitea/python_venv
|
||||||
|
if [ ! -f "$VENV/bin/pip" ]; then
|
||||||
|
echo "=== 최초 1회 venv 생성 및 패키지 설치 ==="
|
||||||
|
/usr/bin/python3 -m venv "$VENV"
|
||||||
|
"$VENV/bin/pip" install --upgrade pip --quiet
|
||||||
|
"$VENV/bin/pip" install "numpy==1.24.4" "pandas==2.0.3" \
|
||||||
|
yfinance pyyaml openpyxl --quiet --prefer-binary
|
||||||
|
if [ -f requirements.txt ]; then
|
||||||
|
"$VENV/bin/pip" install -r requirements.txt --quiet --prefer-binary
|
||||||
|
fi
|
||||||
|
echo "venv 설치 완료"
|
||||||
|
else
|
||||||
|
echo "=== venv 재사용: $("$VENV/bin/python" --version 2>&1) ==="
|
||||||
fi
|
fi
|
||||||
export PATH=$HOME/.local/bin:$PATH
|
# 이후 모든 스텝에서 venv python 사용
|
||||||
python3 -c "import platform, sys; print('[ENV_DEBUG] Platform:', platform.platform(), 'Python:', sys.version)"
|
echo "$VENV/bin" >> $GITHUB_PATH
|
||||||
python3 -m pip install --upgrade pip --user --quiet
|
|
||||||
python3 -m pip install --upgrade --force-reinstall "setuptools==59.6.0" "wheel" "Cython<3.0" --user --quiet
|
|
||||||
python3 -c "import setuptools; print('[ENV_DEBUG] installed setuptools:', setuptools.__version__)"
|
|
||||||
python3 -m pip install "numpy==1.24.4" --user --quiet --no-build-isolation
|
|
||||||
python3 -m pip install "pandas==2.0.3" --user --quiet --no-build-isolation
|
|
||||||
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt --user --quiet --prefer-binary; fi
|
|
||||||
python3 -m pip install yfinance pyyaml openpyxl --user --quiet --prefer-binary
|
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Install Node Dependencies
|
- name: Install Node Dependencies
|
||||||
run: npm install --quiet
|
run: npm install --quiet
|
||||||
|
|||||||
Reference in New Issue
Block a user