Skip to content

Commit

Permalink
Make build-and-test-on-freebsd fail if steps to not complete successf…
Browse files Browse the repository at this point in the history
…ully

This workflow is a different from most in that the entire build and test is done in a single script
in a FreeBSB container on an Ubuntu host. Because it is one large shell script with no separate
"jobs" exits needed to be added to ensure the test fails if any important steps fail to complete
successfully.

Adds missing rebar3 installation required to complete the tests build.

Signed-off-by: Winford <winford@object.stream>
  • Loading branch information
UncleGrumpy committed Jan 19, 2025
1 parent 8e4efd6 commit 6d7ff70
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build-and-test-on-freebsd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: vmactions/freebsd-vm@v1
timeout-minutes: 20
with:
release: 13.2
release: 14.1
envs: 'ATOMVM_EXAMPLE'
usesh: true
sync: rsync
Expand All @@ -73,60 +73,68 @@ jobs:
echo "**hw.ncpu:**"
sysctl -n hw.ncpu
echo "%%"
echo "%% Installing rebar3 ..."
echo "%%"
wget --no-verbose https://github.com/erlang/rebar3/releases/download/3.24.0/rebar3
chmod +x rebar3
./rebar3 local install
export PATH="${PATH}:${HOME}/.cache/rebar3/bin"
echo "%%"
echo "%% Running CMake ..."
echo "%%"
mkdir build
cd build
cmake .. -DMBEDTLS_ROOT_DIR=/usr/local -DAVM_WARNINGS_ARE_ERRORS=ON
cmake .. -DMBEDTLS_ROOT_DIR=/usr/local -DAVM_WARNINGS_ARE_ERRORS=ON || exit 1
echo "%%"
echo "%% Building AtomVM ..."
echo "%%"
make -j `sysctl -n hw.ncpu`
make -j `sysctl -n hw.ncpu` || exit 1
echo "%%"
echo "%% Running test-erlang ..."
echo "%%"
./tests/test-erlang
./tests/test-erlang || exit 1
echo "%%"
echo "%% Running test-enif ..."
echo "%%"
./tests/test-enif
./tests/test-enif | exit 1
echo "%%"
echo "%% Running test-mailbox ..."
echo "%%"
./tests/test-mailbox
./tests/test-mailbox || exit 1
echo "%%"
echo "%% Running test-structs ..."
echo "%%"
./tests/test-structs
./tests/test-structs || exit 1
echo "%%"
echo "%% Running estdlib tests ..."
echo "%%"
./src/AtomVM tests/libs/estdlib/test_estdlib.avm
./src/AtomVM tests/libs/estdlib/test_estdlib.avm || exit 1
echo "%%"
echo "%% Running eavmlib tests ..."
echo "%%"
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm || exit 1
echo "%%"
echo "%% Running alisp tests ..."
echo "%%"
./src/AtomVM tests/libs/alisp/test_alisp.avm
./src/AtomVM tests/libs/alisp/test_alisp.avm || exit 1
echo "%%"
echo "%% Running install ..."
echo "%%"
make install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h
make install || exit 1
atomvm examples/erlang/hello_world.avm || exit 1
atomvm -v || exit 1
atomvm -h || exit 1
echo "%%"
echo "%% Done!"
Expand Down

0 comments on commit 6d7ff70

Please sign in to comment.