Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build a catalogue in CI #1632

Merged
merged 15 commits into from
Oct 5, 2021
Merged
7 changes: 7 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ jobs:
cmake .. -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_PYTHON=ON -DARB_VECTORIZE=${{ matrix.config.simd }} -DPython3_EXECUTABLE=`which python` -DARB_WITH_MPI=${{ matrix.config.mpi }} -DARB_USE_BUNDLED_LIBS=ON
make -j4 tests examples pyarb html
cd -
- name: Install arbor
run: |
cd build
sudo make install
cd -
- name: Run unit tests
run: |
build/bin/unit
Expand All @@ -175,3 +180,5 @@ jobs:
run: mpirun -n 4 -oversubscribe python python/test/unit_distributed/runner.py -v2
- name: Run Python examples
run: scripts/run_python_examples.sh
- name: Build a catalogue
run: build-catalogue -v default mechanisms/default
8 changes: 6 additions & 2 deletions scripts/build-catalogue.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ with TemporaryDirectory() as tmp:
fd.write(cmake)
shutil.copy2(f'@ARB_INSTALL_DATADIR@/BuildModules.cmake', tmp)
shutil.copy2(f'@ARB_INSTALL_DATADIR@/generate_catalogue', tmp)
sp.run('cmake ..', shell=True, check=True, capture_output=not verbose)
sp.run('make', shell=True, check=True, capture_output=not verbose)
if verbose:
out, err = (None, None)
else:
out, err = (sp.DEVNULL, sp.DEVNULL)
sp.run('cmake ..', shell=True, check=True, stdout=out, stderr=err)
sp.run('make', shell=True, check=True, stdout=out, stderr=err)
shutil.copy2(f'{name}-catalogue.so', pwd)
if not quiet:
print(f'Catalogue has been built and copied to {pwd}/{name}-catalogue.so')