Fix return type for get_medoids_final()
and expose get_labels()
#332
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run CMake build on MacOS | |
on: | |
push: | |
branches: # prevents running on tag push | |
- '**' | |
pull_request: | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
# On the MacOS machine, when installing from source, | |
# we use LLVM Clang | |
- name: Install MacOS dependencies | |
run: | | |
brew install llvm libomp armadillo | |
- name: Install Armadillo 10.7.5+ | |
run: | | |
cd ~ | |
git clone https://gitlab.com/conradsnicta/armadillo-code.git | |
cd armadillo-code | |
sudo cmake . | |
sudo make install | |
- name: Install carma | |
run: | | |
cd ~ | |
git clone https://github.com/RUrlus/carma.git | |
cd carma | |
mkdir build | |
cd build | |
sudo cmake -DCARMA_INSTALL_LIB=ON .. | |
sudo cmake --build . --config Release --target install | |
cd ~ | |
- name: Downloading data files for tests | |
run: | | |
mkdir -p data | |
curl -XGET https://motiwari.com/banditpam_data/MNIST_1k.csv > data/MNIST_1k.csv | |
- name: Clone for PR | |
if: ${{ github.event_name == 'pull_request' }} | |
run: git clone -b $GITHUB_HEAD_REF https://github.com/motiwari/BanditPAM | |
- name: Clone for Push | |
if: ${{ github.event_name != 'pull_request' }} | |
run: git clone -b ${GITHUB_REF#refs/heads/} https://github.com/motiwari/BanditPAM | |
# On the MacOS machine, when installing from source, | |
# we use LLVM Clang | |
# TODO(@motiwari): Clean this environment variables up | |
- name: Verify that the C++ executable compiles and runs | |
run : | | |
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile | |
source /Users/runner/.bash_profile | |
export LDFLAGS="-L/usr/local/opt/llvm/lib, -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++" | |
export CPPFLAGS="-I/usr/local/opt/llvm/include" | |
export DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib:/usr/local/opt/libomp/include | |
export CC=/usr/local/opt/llvm/bin/clang | |
export CXX=/usr/local/opt/llvm/bin/clang++ | |
cd BanditPAM | |
mkdir build | |
cd build | |
sudo CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ cmake .. | |
sudo make | |
src/BanditPAM -f ../data/MNIST_1k.csv -k 5 -l L2 | |
env: | |
CPLUS_INCLUDE_PATH: /usr/local/include/carma:/usr/local/Cellar/libomp/15.0.2/include:/usr/local/Cellar/libomp/15.0.7/include |