Skip to content

Commit

Permalink
Use conda for OSX CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
beauby committed Sep 27, 2022
1 parent 58775ea commit 2dfbf28
Showing 1 changed file with 11 additions and 38 deletions.
49 changes: 11 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,48 +104,21 @@ jobs:
steps:
- checkout
- run:
name: Install Homebrew packages
command: |
brew install cmake swig libomp
- run:
name: Install numpy/scipy
command: |
pip3 install numpy scipy
- run:
name: Generate Makefiles
command: |
cmake -B build -DBUILD_TESTING=ON -DFAISS_ENABLE_GPU=OFF \
-DCMAKE_BUILD_TYPE=Release -DFAISS_ENABLE_C_API=ON \
-DPython_EXECUTABLE=/usr/local/bin/python3 .
- run:
name: Build faiss library
command: |
make -k -C build -j faiss
- run:
name: Test faiss library
command: |
make -C build -j faiss_test
export GTEST_OUTPUT="xml:$PWD/test-results/googletest/"
make -C build test
- run:
name: Build python extension
name: Install conda
command: |
make -C build -j swigfaiss
cd build/faiss/python
python3 setup.py build
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
$HOME/miniconda/bin/conda install -y -q conda-build
- run:
name: Test python extension
name: Install MacOSX10.9 SDK
command: |
pip3 install pytest torch
export PYTHONPATH="$(ls -d ./build/faiss/python/build/lib*/)"
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
- store_test_results:
path: test-results
curl -L -o - https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz | sudo tar xJf - -C /opt
- run:
name: Build C API
name: Build/test
command: |
make -k -C build -j faiss_c
export PATH=~/miniconda/bin:$PATH
cd conda
conda build faiss --python 3.8 -c pytorch
build_windows:
executor:
Expand All @@ -158,7 +131,7 @@ jobs:
command: |
conda install conda-build
cd conda
conda build faiss --python 3.7 -c pytorch
conda build faiss --python 3.8 -c pytorch
build_arm:
machine:
Expand Down

0 comments on commit 2dfbf28

Please sign in to comment.