From 2dfbf28bea75ff20a845c300f857dd1bfa8333eb Mon Sep 17 00:00:00 2001 From: Lucas Hosseini Date: Tue, 27 Sep 2022 16:17:25 +0200 Subject: [PATCH] Use conda for OSX CI. --- .circleci/config.yml | 49 ++++++++++---------------------------------- 1 file changed, 11 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f2804cf8b..36984c7164 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -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: