name: CI Test Suite on: [push, pull_request] jobs: run-tests: runs-on: docker steps: - name: 저장소 체크아웃 uses: actions/checkout@v4 # 1. 기존 APT 캐시 복원 (가장 최근 상태 불러오기) - name: Restore APT Cache id: restore-apt uses: actions/cache/restore@v4 with: path: /var/cache/apt/archives key: linux-apt-temp restore-keys: | linux-apt- # 2. 포트란 컴파일러 및 MPI, 파이썬 시스템 패키지 설치 - name: Install System Packages run: | if [ -f /etc/apt/apt.conf.d/docker-clean ]; then echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' | tee /etc/apt/apt.conf.d/keep-cache rm -f /etc/apt/apt.conf.d/docker-clean fi apt-get update apt-get install -y python3 python3-pip python3-venv gfortran openmpi-bin libopenmpi-dev apt-get autoclean -y rm -f /var/cache/apt/archives/partial/* # 3. .deb 파일 해시 기반 APT 캐시 갱신 및 저장 - name: Calculate APT Cache Hash id: apt-hash run: | DEB_HASH=$(find /var/cache/apt/archives -name "*.deb" -type f -printf "%f\n" | sort | md5sum | awk '{print $1}') echo "hash=$DEB_HASH" >> $GITHUB_OUTPUT - name: Save APT Cache if: steps.restore-apt.outputs.cache-matched-key != format('linux-apt-{0}', steps.apt-hash.outputs.hash) uses: actions/cache/save@v4 with: path: /var/cache/apt/archives key: linux-apt-${{ steps.apt-hash.outputs.hash }} # 4. 파이썬 가상환경 생성 및 수식 최적화/파서 패키지 빌드 - name: Setup Virtual Environment & Dependencies run: | python3 -m venv venv . venv/bin/activate pip install --upgrade pip pip install lark sympy numpy jinja2 # 5. 자가 생성형 합성 격자 분석 수치 정밀도 테스트 실행 - name: Run Analytical Synthetic Grid Verification Test run: | . venv/bin/activate python3 code/code_gen/regression_verify_synthetic.py