Skip to content

Commit

Permalink
Fix Windows CI (#1616)
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
naveentatikonda authored Apr 15, 2024
1 parent 51d257e commit 07d00d9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
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

0 comments on commit 07d00d9

Please sign in to comment.