Skip to content

Commit a8db207

Browse files
committed
CI: Tests building Elixir & Demos
Signed-off-by: Peter M <petermm@gmail.com>
1 parent 95b2e44 commit a8db207

4 files changed

Lines changed: 39 additions & 26 deletions

File tree

.github/workflows/build-examples.yaml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,22 @@ on: ["push", "pull_request"]
1010

1111
jobs:
1212
build_erlang_examples:
13-
name: "Build Erlang Examples"
13+
name: "Build Erlang/Elixir Examples"
1414
runs-on: ubuntu-latest
1515

1616
strategy:
1717
fail-fast: true
1818

1919
steps:
20-
21-
- uses: erlef/setup-beam@v1
22-
with:
23-
otp-version: "24"
24-
elixir-version: "1.11"
25-
26-
- name: Checkout repo
27-
uses: actions/checkout@v2
28-
29-
# - name: "APT update"
30-
# run: sudo apt update -y
31-
32-
- name: "Build rebar3"
33-
run: |
34-
cd /tmp
35-
git clone https://github.com/erlang/rebar3.git
36-
cd rebar3
37-
./bootstrap
38-
39-
- name: "Build Erlang Example Programs"
40-
run: |
41-
PATH=/tmp/rebar3:$PATH ./build.sh
20+
- uses: erlef/setup-beam@v1
21+
with:
22+
otp-version: "26"
23+
elixir-version: "1.18"
24+
rebar3-version: "3.24.0"
25+
26+
- name: Checkout repo
27+
uses: actions/checkout@v4
28+
29+
- name: "Build Erlang/Elixir Example Programs"
30+
run: |
31+
./build.sh

.github/workflows/reuse-lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
test:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- name: REUSE Compliance Check
19-
uses: fsfe/reuse-action@v1
17+
- uses: actions/checkout@v4
18+
- name: REUSE Compliance Check
19+
uses: fsfe/reuse-action@v1

build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,25 @@ for i in ${ERLANG_EXAMPLES}; do
2828
${REBAR} atomvm packbeam -l || exit 1
2929
cd ..
3030
done
31+
cd ..
32+
cd elixir
33+
ELIXIR_EXAMPLES="$(/bin/ls | grep -v README.md)"
34+
for i in ${ELIXIR_EXAMPLES}; do
35+
cd $i
36+
rm -rf _build
37+
mix deps.get && mix atomvm.packbeam || exit 1
38+
cd ..
39+
done
40+
cd ..
41+
cd demos
42+
DEMO_EXAMPLES="$(/bin/ls | grep -v README.md)"
43+
for i in ${DEMO_EXAMPLES}; do
44+
cd $i
45+
rm -rf _build
46+
if [ -f mix.exs ]; then
47+
mix deps.get && mix atomvm.packbeam || exit 1
48+
else
49+
${REBAR} atomvm packbeam -l || exit 1
50+
fi
51+
cd ..
52+
done

elixir/LEDC_Example/mix.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ defmodule LedcExample.MixProject do
2323

2424
def project do
2525
[
26+
app: :LedcExample,
2627
version: "0.1.0",
2728
elixir: "~> 1.13",
2829
start_permanent: Mix.env() == :prod,

0 commit comments

Comments
 (0)