diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3f26b5571..1f55c16409 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v7.0.1 with: - fetch-depth: 0 + # CMake only needs `git log -1` for the commit info; a shallow + # fetch is enough and saves ~10 min on cache-cold runners. + fetch-depth: 1 # We will handle submodules manually after fixing ownership submodules: 'false' @@ -47,6 +49,14 @@ jobs: xz-utils sudo pip install clang-format clang-tidy + - name: Setup ccache + run: | + # Default cache size (~10G) is too small for a full -O3 -g build + # plus daily develop churn; raise it and reset per-run counters. + ccache --max-size=30G + ccache --zero-stats + ccache -s + - name: Install external tools from toolchain run: | cd toolchain @@ -308,3 +318,7 @@ jobs: OMP_NUM_THREADS: '2' run: | ctest --test-dir build -V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|17_DS_DFTU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|MODULE_PSI|MODULE_ESTATE|MODULE_RI|MODULE_HAMILT|MODULE_PW|MODULE_LCAO|MODULE_AO|MODULE_NAO|MODULE_RELAX|MODULE_LR' + + - name: ccache statistics + if: always() + run: ccache -s