Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows CI on 1.3 #1616

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ jobs:
- name: Checkout k-NN
uses: actions/checkout@v1

- name: Apply Git Patch
# Deleting file at the end to skip `git apply` inside CMAKE file
run: |
git submodule update --init -- jni/external/faiss
cd jni/external/faiss
git apply --ignore-space-change --ignore-whitespace --3way ../../patches/faiss/0001-Add-missing-headers-for-gcc.patch
rm ../../patches/faiss/0001-Add-missing-headers-for-gcc.patch
working-directory: ${{ github.workspace }}

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
Expand All @@ -76,6 +85,15 @@ jobs:
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
- name: Install Zlib Using Scoop
run: |
echo "C:/Users/runneradmin/scoop/shims" >> $env:GITHUB_PATH
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
scoop bucket add extras
scoop install zlib
regedit /s "C:\\Users\\runneradmin\\scoop\\apps\\zlib\\current\\register.reg"
- name: Download OpenBLAS
run: |
curl -L -O https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
Expand Down
1 change: 1 addition & 0 deletions jni/include/jni_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string>
#include <vector>
#include <unordered_map>
#include <cstdint>

namespace knn_jni {

Expand Down
26 changes: 26 additions & 0 deletions jni/patches/faiss/0001-Add-missing-headers-for-gcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/faiss/Clustering.h b/faiss/Clustering.h
index ef1f00ad..ae341115 100644
--- a/faiss/Clustering.h
+++ b/faiss/Clustering.h
@@ -10,7 +10,7 @@
#ifndef FAISS_CLUSTERING_H
#define FAISS_CLUSTERING_H
#include <faiss/Index.h>
-
+#include <cstdint>
#include <vector>

namespace faiss {
diff --git a/faiss/Index.h b/faiss/Index.h
index 3d1bdb99..eaed1b14 100644
--- a/faiss/Index.h
+++ b/faiss/Index.h
@@ -16,6 +16,8 @@
#include <string>
#include <typeinfo>

+#include <cstdint>
+
#define FAISS_VERSION_MAJOR 1
#define FAISS_VERSION_MINOR 8
#define FAISS_VERSION_PATCH 0
Loading