Skip to content

Commit

Permalink
add precompile step
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Feb 24, 2024
1 parent 75ecd75 commit dc8cf6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,23 @@ jobs:
working-directory: ./kinda_example
run: |
mix test --force
- name: Production build
- name: Precompile
working-directory: ./kinda_example
env:
MIX_ENV: prod
ELIXIR_MAKE_CACHE_DIR: .
run: |
mix
- name: Tar production native libraries
rm -rf _build
mix elixir_make.precompile
- name: Start mock server in the background
working-directory: ./kinda_example
id: tar
env:
MIX_ENV: prod
run: |
set -u
mix elixir_make.precompile
python3 -m http.server --directory . &> /dev/null &
sleep 3
ps aux
- name: Test precompiled
working-directory: ./kinda_example
run: |
MIX_ENV=prod mix elixir_make.checksum --all --ignore-unavailable --only-local --print
mix clean
mix test --exclude vulkan --exclude todo
3 changes: 1 addition & 2 deletions kinda_example/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ defmodule KindaExample.MixProject do
] ++
[
make_precompiler: {:nif, Kinda.Precompiler},
make_precompiler_url:
"https://github.com/beaver-lodge/beaver-prebuilt/releases/download/2023-12-23-1442"
make_precompiler_url: "http://127.0.0.1:8000/@{artefact_filename}"
]
end

Expand Down

0 comments on commit dc8cf6e

Please sign in to comment.