Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Nov 21, 2023
1 parent 2f8eca8 commit 0ae0ea5
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule HNSWLib.MixProject do
use Mix.Project

@version "0.1.2"
@version "0.1.3"
@github_url "https://github.com/elixir-nx/hnswlib"

def project do
Expand All @@ -20,9 +20,7 @@ defmodule HNSWLib.MixProject do
make_precompiler_url: "#{@github_url}/releases/download/v#{@version}/@{artefact_filename}",
make_precompiler_filename: "hnswlib_nif",
make_precompiler_nif_versions: [versions: ["2.16", "2.17"]],
cc_precompiler: [
cleanup: "cleanup"
]
cc_precompiler: cc_precompiler()
]
end

Expand Down Expand Up @@ -53,6 +51,20 @@ defmodule HNSWLib.MixProject do
]
end

defp cc_precompiler do
extra_options =
if System.get_env("HNSWLIB_CI_PRECOMPILE") == "true" do
[
only_listed_targets: true,
exclude_current_target: true
]
else
[]
end

[cleanup: "cleanup"] ++ extra_options
end

defp package() do
[
files:
Expand Down

0 comments on commit 0ae0ea5

Please sign in to comment.