Skip to content

Commit 03718bc

Browse files
committed
Cache NEST source build in CI and parallelize compile
The NEST build from source (~18 min per Ubuntu job) dominates CI time. Cache the ~/.local install tree keyed on NEST/OS/Python version so it is rebuilt only on a cache miss, and use make -j to parallelize the compile when a rebuild is needed.
1 parent 989f9df commit 03718bc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/full-test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,21 @@ jobs:
4646
run: |
4747
python -m pip install "neuron>=9.0.0" morphio
4848
python -m pip install "nrnutils>0.2.0"
49-
- name: Install NEST
49+
- name: Cache NEST build
50+
id: cache-nest
5051
if: startsWith(matrix.os, 'ubuntu')
52+
uses: actions/cache@v4
53+
with:
54+
path: ~/.local
55+
key: nest-3.10-mpi-${{ matrix.os }}-py${{ matrix.python-version }}
56+
- name: Install NEST
57+
if: startsWith(matrix.os, 'ubuntu') && steps.cache-nest.outputs.cache-hit != 'true'
5158
run: |
5259
python -m pip install "cython<3.1.0"
5360
wget https://github.com/nest/nest-simulator/archive/refs/tags/v3.10.tar.gz -O nest-simulator-3.10.tar.gz
5461
tar xzf nest-simulator-3.10.tar.gz
5562
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -Dwith-mpi=ON ./nest-simulator-3.10
56-
make
63+
make -j$(nproc)
5764
make install
5865
- name: Install Arbor
5966
if: startsWith(matrix.os, 'ubuntu')

0 commit comments

Comments
 (0)