Skip to content

Add tests for FAISS and release memory (#15) #16

Add tests for FAISS and release memory (#15)

Add tests for FAISS and release memory (#15) #16

Workflow file for this run

name: CI
on:
# Triggers the workflow on push or pull request events but only for the "develop" branch
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:
jobs:
build-run-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/ggeorgakoudis/ams-ci-test-ruby-centos7
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- name: Build AMS
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
mkdir build
cd build
export AMS_MFEM_PATH=$(spack location -i mfem)
export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch
export AMS_FAISS_PATH=$(spack location -i faiss)
export AMS_UMPIRE_PATH=$(spack location -i umpire)
export AMS_HDF5_PATH=$(spack location -i hdf5)
cmake \
-DBUILD_SHARED_LIBS=On \
-DCMAKE_PREFIX_PATH=$INSTALL_DIR \
-DWITH_CALIPER=On \
-DWITH_DB=On \
-DWITH_HDF5=On \
-DWITH_EXAMPLES=On \
-DHDF5_Dir=$AMS_HDF5_PATH \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=Off \
-DUMPIRE_DIR=$AMS_UMPIRE_PATH \
-DMFEM_DIR=$AMS_MFEM_PATH \
-DWITH_FAISS=On \
-DWITH_MPI=On \
-DWITH_TORCH=On \
-DWITH_TESTS=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_FAISS=On \
-DFAISS_DIR=$AMS_FAISS_PATH \
-DWITH_AMS_DEBUG=On \
-DWITH_WORKFLOW=On \
$GITHUB_WORKSPACE
make
- name: Run tests
run: |
cd build
make test