update ci #11
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: CI | |
on: | |
# TODO: remove push event for submission | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
# Push events on main branch | |
- main | |
- master | |
# Sequence of patterns matched against refs/tags | |
tags: "*" | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: "Ref (commit hash0" | |
required: false | |
default: "" | |
jobs: | |
test: | |
name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.8" | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
exclude: | |
- os: macOS-latest | |
arch: x86 | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
fetch-depth: 0 | |
- run: git checkout ${{ github.event.inputs.ref }} | |
if: ${{ github.event.inputs.ref != '' }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash -el {0} | |
run: | | |
conda create -n faiss python=3.10 | |
conda activate faiss | |
conda install -c pytorch faiss-cpu=1.7.4 mkl=2021 blas=1.0=mkl | |
conda install matplotlib scikit-learn | |
pip install h5py | |
- name: Run benchmark (size=300K) | |
shell: bash -el {0} | |
run: | | |
conda activate faiss | |
chmod +x ./run_300K.sh | |
./run_300K.sh | |
python3 eval/eval.py | |
python3 eval/plot.py --size=300K res.csv | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Results on 300K | |
path: | | |
res.csv | |
result_300K.png | |
# - name: Run benchmark (size=10M) | |
# shell: bash -el {0} | |
# run: | | |
# conda activate faiss | |
# chmod +x ./run_10M.sh | |
# ./run_10M.sh | |
# python3 eval/eval.py | |
# python3 eval/plot.py --size=10M res.csv | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: Results on 10M | |
# path: | | |
# res.csv | |
# result_10M.png | |
# - name: Run benchmark (size=30M) | |
# shell: bash -el {0} | |
# run: | | |
# conda activate faiss | |
# chmod +x ./run_30M.sh | |
# ./run_30M.sh | |
# python3 eval/eval.py | |
# python3 eval/plot.py --size=30M res.csv | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: Results on 30M | |
# path: | | |
# res.csv | |
# result_30M.png | |
# - name: Run benchmark (size=100M) | |
# shell: bash -el {0} | |
# run: | | |
# conda activate faiss | |
# chmod +x ./run_100M.sh | |
# ./run_100M.sh | |
# python3 eval/eval.py | |
# python3 eval/plot.py --size=100M res.csv | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: Results on 100M | |
# path: | | |
# res.csv | |
# result_100M.png |