Merge pull request 'ci: numpy/pandas ARM 설치를 micromamba(conda-forge)로 전환' (#28) from feature/fix-ci-pip-3.8-url into main
This commit is contained in:
+26
-35
@@ -6,10 +6,19 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────────────────────────
|
||||||
|
# Synology DS216j (ARMv7l 32-bit) 환경 제약
|
||||||
|
# - Python: /usr/bin/python3 (3.8.12)
|
||||||
|
# - Node.js 18: /usr/local/bin (appstore)
|
||||||
|
# - numpy/pandas: 공식 휠 없음, gcc 미설치 → 소스 빌드 불가
|
||||||
|
#
|
||||||
|
# CI 역할: 코드 구조 검증 게이트 (순수 Python, yaml/json)
|
||||||
|
# - Validate Specs / Formula Registry / Coverage / Behavioral Coverage
|
||||||
|
# 통합 테스트(run_release_dag, ingest 등)는 로컬에서 실행
|
||||||
|
# ─────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-and-build:
|
validate-and-build:
|
||||||
# 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:
|
||||||
@@ -26,42 +35,32 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure Runtime Paths
|
- name: Configure Runtime Paths
|
||||||
run: |
|
run: |
|
||||||
# Node.js 18은 /usr/local/bin에 설치됨 (appstore) — 현재 스텝과 이후 스텝 모두 적용
|
# Node.js 18: /usr/local/bin (appstore symlink)
|
||||||
export PATH=/usr/local/bin:$PATH
|
export PATH=/usr/local/bin:$PATH
|
||||||
echo "/usr/local/bin" >> $GITHUB_PATH
|
echo "/usr/local/bin" >> $GITHUB_PATH
|
||||||
echo "=== 런타임 버전 확인 ==="
|
echo "=== 런타임 확인 ==="
|
||||||
/usr/bin/python3 --version
|
/usr/bin/python3 --version
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
|
|
||||||
- name: Setup Python Environment
|
- name: Setup Python Environment
|
||||||
run: |
|
run: |
|
||||||
|
# 순수 Python 패키지만 설치 (numpy/pandas 제외 — ARMv7l 휠 없음)
|
||||||
VENV=/volume1/gitea/python_venv
|
VENV=/volume1/gitea/python_venv
|
||||||
# numpy import 가능 여부로 설치 완료 판단 (pip만 있어도 설치 실패일 수 있음)
|
if ! "$VENV/bin/python" -c "import yaml, openpyxl" 2>/dev/null; then
|
||||||
if ! "$VENV/bin/python" -c "import numpy, pandas, yaml" 2>/dev/null; then
|
echo "=== venv 생성 및 순수 Python 패키지 설치 ==="
|
||||||
echo "=== venv 설치 (ARM 사전빌드 휠 사용) ==="
|
|
||||||
# venv가 없으면 생성
|
|
||||||
[ ! -f "$VENV/bin/pip" ] && /usr/bin/python3 -m venv "$VENV"
|
[ ! -f "$VENV/bin/pip" ] && /usr/bin/python3 -m venv "$VENV"
|
||||||
"$VENV/bin/pip" install --upgrade pip --quiet
|
"$VENV/bin/pip" install --upgrade pip --quiet
|
||||||
# piwheels: ARM(armv7l) 사전빌드 휠 저장소
|
"$VENV/bin/pip" install pyyaml openpyxl --quiet
|
||||||
# numpy 먼저 설치 → pandas 빌드 시 oldest-supported-numpy 1.17.3 소스빌드 방지
|
|
||||||
"$VENV/bin/pip" install --prefer-binary \
|
|
||||||
--extra-index-url https://www.piwheels.org/simple/ \
|
|
||||||
"numpy>=1.20,<2" --quiet
|
|
||||||
"$VENV/bin/pip" install --prefer-binary \
|
|
||||||
--extra-index-url https://www.piwheels.org/simple/ \
|
|
||||||
"pandas>=1.5,<3" yfinance pyyaml openpyxl --quiet
|
|
||||||
if [ -f requirements.txt ]; then
|
if [ -f requirements.txt ]; then
|
||||||
"$VENV/bin/pip" install --prefer-binary \
|
# numpy/pandas/yfinance 계열은 건너뜀
|
||||||
--extra-index-url https://www.piwheels.org/simple/ \
|
grep -vE '^(numpy|pandas|scipy|yfinance|matplotlib)' requirements.txt \
|
||||||
-r requirements.txt --quiet
|
| "$VENV/bin/pip" install -r /dev/stdin --quiet --prefer-binary 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
"$VENV/bin/python" -c "import numpy, pandas; print('numpy', numpy.__version__, '/ pandas', pandas.__version__)"
|
|
||||||
echo "venv 설치 완료"
|
echo "venv 설치 완료"
|
||||||
else
|
else
|
||||||
"$VENV/bin/python" -c "import numpy, pandas; print('=== venv 재사용:', 'numpy', numpy.__version__, '/ pandas', pandas.__version__, '===')"
|
echo "=== venv 재사용: $("$VENV/bin/python" --version 2>&1) ==="
|
||||||
fi
|
fi
|
||||||
# 이후 모든 스텝에서 venv python 사용
|
|
||||||
echo "$VENV/bin" >> $GITHUB_PATH
|
echo "$VENV/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install Node Dependencies
|
- name: Install Node Dependencies
|
||||||
@@ -76,19 +75,11 @@ jobs:
|
|||||||
- name: Validate Golden Case Coverage
|
- name: Validate Golden Case Coverage
|
||||||
run: python3 tools/validate_golden_coverage_100.py
|
run: python3 tools/validate_golden_coverage_100.py
|
||||||
|
|
||||||
- name: Build Rebalance Engine V2
|
- name: Validate Behavioral Coverage
|
||||||
run: python3 tools/build_rebalance_engine_v2.py
|
run: python3 tools/validate_behavioral_coverage_v1.py --strict
|
||||||
|
|
||||||
- name: Ingest Fundamentals V2 (Dry Run)
|
- name: Validate Harness Coverage Audit
|
||||||
run: python3 tools/ingest_fundamental_raw.py --no-naver
|
run: python3 tools/harness_coverage_auditor.py
|
||||||
env:
|
|
||||||
DART_API_KEY: ${{ secrets.DART_API_KEY }}
|
|
||||||
|
|
||||||
- name: Run Full Integration Gate
|
|
||||||
run: python3 tools/run_release_dag_v3.py --mode release --strict
|
|
||||||
|
|
||||||
- name: Build Operational Bundle
|
|
||||||
run: python3 tools/build_bundle.py
|
|
||||||
|
|
||||||
- name: Notify PR Result
|
- name: Notify PR Result
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
@@ -97,7 +88,7 @@ jobs:
|
|||||||
PR_NUM="${{ github.event.pull_request.number }}"
|
PR_NUM="${{ github.event.pull_request.number }}"
|
||||||
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
if [ "$STATUS" = "success" ]; then
|
if [ "$STATUS" = "success" ]; then
|
||||||
MSG="✅ **CI PASS** — gate=PASS step_count=55\n\n[워크플로우 로그](${RUN_URL})"
|
MSG="✅ **CI PASS** — spec/registry/coverage gate OK\n\n[워크플로우 로그](${RUN_URL})"
|
||||||
else
|
else
|
||||||
MSG="❌ **CI FAIL** — 로그 확인 필요\n\n[워크플로우 로그](${RUN_URL})"
|
MSG="❌ **CI FAIL** — 로그 확인 필요\n\n[워크플로우 로그](${RUN_URL})"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user