Skip to content

Commit

Permalink
Test build-catalogue in CI
Browse files Browse the repository at this point in the history
- `make install` in CI
- make `build-catalogue` play nice with Python 3.6
- execute `build-catalogue`
  • Loading branch information
schmitts authored and max9901 committed Oct 11, 2021
1 parent de700b8 commit 82c0a5e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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')

0 comments on commit 82c0a5e

Please sign in to comment.