Skip to content

Commit 4717c9f

Browse files
authored
add support for freebsd (#40)
* add support for freebsd - philss/rustler_precompiled#55 - https://github.com/elixir-explorer/explorer/blob/main/.github/workflows/release.yml#L41 * update action * add freebsd to the list of targets
1 parent 00a3e8c commit 4717c9f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
2727
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
2828
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
29+
- { target: x86_64-unknown-freebsd, os: ubuntu-22.04, use-cross: true, cross-version: v0.2.5 }
2930

3031
steps:
3132
- name: Checkout source code
@@ -44,13 +45,14 @@ jobs:
4445

4546
- name: Build the project
4647
id: build-crate
47-
uses: philss/[email protected].0
48+
uses: philss/[email protected].1
4849
with:
4950
project-name: exkeccak
5051
project-version: ${{ env.PROJECT_VERSION }}
5152
target: ${{ matrix.job.target }}
5253
nif-version: ${{ matrix.nif }}
5354
use-cross: ${{ matrix.job.use-cross }}
55+
cross-version: ${{ matrix.job.cross-version || 'v0.2.4' }}
5456
project-dir: "native/exkeccak"
5557

5658
- name: Artifact upload

lib/ex_keccak.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ defmodule ExKeccak do
1313
base_url: "https://github.com/tzumby/ex_keccak/releases/download/v#{version}",
1414
force_build: System.get_env("EXKECCAK_BUILD") in ["1", true] or env_config[:ex_keccak],
1515
targets:
16-
Enum.uniq(["aarch64-unknown-linux-musl" | RustlerPrecompiled.Config.default_targets()]),
16+
Enum.uniq(
17+
["aarch64-unknown-linux-musl", "x86_64-unknown-freebsd"] ++
18+
RustlerPrecompiled.Config.default_targets()
19+
),
1720
version: version
1821

1922
def hash_256(_data), do: :erlang.nif_error(:nif_not_loaded)

0 commit comments

Comments
 (0)