Skip to content

Commit 9aa0ca7

Browse files
committed
Merge remote-tracking branch 'origin/main' into doorgan/multiroot_support
2 parents 88e884b + e655dfe commit 9aa0ca7

File tree

31 files changed

+383
-1491
lines changed

31 files changed

+383
-1491
lines changed

.github/workflows/elixir.yml

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,55 @@ jobs:
136136
make compile.protocols.poncho
137137
make dialyzer.all
138138
139+
release-test:
140+
runs-on: ${{matrix.os.name}}
141+
name: Release test (${{matrix.os.name}})
142+
strategy:
143+
matrix:
144+
os:
145+
- name: ubuntu-latest
146+
target: linux_amd64
147+
- name: macos-14
148+
target: darwin_arm64
149+
- name: macos-13
150+
target: darwin_amd64
151+
152+
include:
153+
- elixir: "1.15.8"
154+
otp: "27"
155+
156+
steps:
157+
- name: Checkout code
158+
uses: actions/checkout@v4
159+
160+
- name: Set up Elixir
161+
uses: erlef/setup-beam@v1
162+
with:
163+
otp-version: ${{matrix.otp}}
164+
elixir-version: ${{matrix.elixir}}
165+
166+
- uses: mlugg/setup-zig@v2
167+
with:
168+
version: "0.14.0"
169+
170+
- name: Cache deps
171+
id: cache-deps
172+
uses: actions/cache@v4
173+
with:
174+
path: |
175+
apps/**/deps
176+
apps/**/_build
177+
178+
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('apps/**/mix.lock') }}
179+
restore-keys: |
180+
${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-
181+
182+
- name: Build and release
183+
env:
184+
MIX_ENV: prod
185+
BURRITO_TARGET: ${{ matrix.os.target }}
186+
run: make build.engine && cd apps/expert && mix deps.get && mix release expert
187+
139188
test:
140189
runs-on: ubuntu-latest
141190
name: Test on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
@@ -195,29 +244,3 @@ jobs:
195244
# Step: Execute the tests.
196245
- name: Run tests
197246
run: make test.all
198-
199-
integration_test:
200-
runs-on: ubuntu-latest
201-
name: Integration tests
202-
steps:
203-
- name: Checkout code
204-
uses: actions/checkout@v4
205-
206-
- name: Set up Docker Buildx
207-
uses: docker/setup-buildx-action@v3
208-
209-
- name: Build integration runner
210-
uses: docker/build-push-action@v6
211-
with:
212-
context: .
213-
file: ./integration/Dockerfile
214-
tags: xp
215-
# GitHub Actions cache
216-
# https://docs.docker.com/build/ci/github-actions/cache/
217-
cache-from: type=gha
218-
cache-to: type=gha,mode=max
219-
# Required to make the image available through docker
220-
load: true
221-
222-
- name: Run integration tests
223-
run: NO_BUILD=1 ./integration/test.sh

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ apps/forge/src/future_elixir_parser.erl
3232

3333
.DS_Store
3434

35+
# Ignore release artifacts
36+
**/burrito_out
37+
3538
.notes/

Makefile

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
poncho_dirs = forge expert_credo engine expert
22

3+
local_target :=
4+
ifeq ($(OS),Windows_NT)
5+
local_target := $(local_target)windows
6+
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
7+
local_target := $(local_target)_amd64
8+
endif
9+
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
10+
local_target := $(local_target)_amd64
11+
endif
12+
else
13+
UNAME_S := $(shell uname -s)
14+
ifeq ($(UNAME_S),Linux)
15+
local_target := $(local_target)linux
16+
endif
17+
ifeq ($(UNAME_S),Darwin)
18+
local_target := $(local_target)darwin
19+
endif
20+
UNAME_P := $(shell uname -p)
21+
ifeq ($(UNAME_P),x86_64)
22+
local_target := $(local_target)_amd64
23+
endif
24+
ifneq ($(filter %86,$(UNAME_P)),)
25+
local_target := $(local_target)_amd64
26+
endif
27+
ifneq ($(filter arm%,$(UNAME_P)),)
28+
local_target := $(local_target)_arm64
29+
endif
30+
endif
31+
332
compile.all: compile.poncho
433

534
dialyzer.all: compile.poncho dialyzer.poncho
@@ -41,5 +70,20 @@ dialyzer.plt.poncho:
4170
dialyzer.poncho: compile.poncho compile.protocols.poncho
4271
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && mix dialyzer && cd ../..;)
4372

44-
package:
45-
cd apps/expert && mix package
73+
build.engine:
74+
cd apps/engine && mix deps.get && MIX_ENV=dev mix build
75+
76+
release: build.engine
77+
cd apps/expert &&\
78+
mix deps.get &&\
79+
EXPERT_RELEASE_MODE=burrito MIX_ENV=prod mix release expert --overwrite
80+
81+
release.local: build.engine
82+
cd apps/expert &&\
83+
mix deps.get &&\
84+
EXPERT_RELEASE_MODE=burrito BURRITO_TARGET=$(local_target) MIX_ENV=prod mix release expert --overwrite
85+
86+
release.plain: build.engine
87+
cd apps/expert &&\
88+
mix deps.get &&\
89+
EXPERT_RELEASE_MODE=plain MIX_ENV=prod mix release plain --overwrite

apps/engine/lib/engine/engine/build/project.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ defmodule Engine.Build.Project do
7373
defp prepare_for_project_build(true = _initial?) do
7474
if connected_to_internet?() do
7575
with_progress "mix local.hex", fn ->
76-
Mix.Task.run("local.hex", ~w(--force --if-missing))
76+
Mix.Task.run("local.hex", ~w(--force))
7777
end
7878

7979
with_progress "mix local.rebar", fn ->
80-
Mix.Task.run("local.rebar", ~w(--force --if-missing))
80+
Mix.Task.run("local.rebar", ~w(--force))
8181
end
8282

8383
with_progress "mix deps.get", fn ->

apps/engine/priv/.gitkeep

Whitespace-only changes.

apps/expert/bin/activate_version_manager.sh

Lines changed: 0 additions & 100 deletions
This file was deleted.

apps/expert/bin/boot.exs

Lines changed: 0 additions & 29 deletions
This file was deleted.

apps/expert/bin/debug_shell.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ node_name=$(epmd -names | grep manager-"$project_name" | awk '{print $2}')
55

66
iex --name "shell@127.0.0.1" \
77
--remsh "${node_name}" \
8-
--dot-iex .iex.namespaced.exs \
98
--cookie expert

apps/expert/bin/start_expert.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/expert/config/config.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@ config :snowflake,
55
# First second of 2024
66
epoch: 1_704_070_800_000
77

8+
case System.get_env("EXPERT_RELEASE_MODE", "plain") do
9+
"burrito" ->
10+
config :expert, arg_parser: {Burrito.Util.Args, :get_arguments, []}
11+
12+
"plain" ->
13+
config :expert, arg_parser: {System, :argv, []}
14+
end
15+
816
import_config("#{config_env()}.exs")

0 commit comments

Comments
 (0)