Skip to content

Merge branch 'main' of github.com:yushangdi/PECANN-DPC #97

Merge branch 'main' of github.com:yushangdi/PECANN-DPC

Merge branch 'main' of github.com:yushangdi/PECANN-DPC #97

# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Build package and run tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get submodule
run: |
git submodule init
git submodule update
cd ParlayANN
git config --file=.gitmodules submodule.parlaylib.url https://github.com/cmuparlay/parlaylib.git
git submodule sync
git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install python dependencies
run: pip3 install -r requirements.txt
- name: Install Boost
run: sudo apt-get install libboost-program-options-dev
- name: Create build directory
run: |
mkdir build
cd build
- name: Run CMake
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build with Make
run: |
cd build
cmake --build . --config ${{env.BUILD_TYPE}}
- name: Download mnist
run: bin/download_mnist.sh
- name: Build python package
run: pip3 install .
- name: Run python tests
run: bin/python-tests.sh