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 QEMU constainer 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 29ed376
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/build-and-test-on-freebsd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,61 +73,70 @@ 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 || exit 1
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 2
echo "%%"
echo "%% Building AtomVM ..."
echo "%%"
make -j `sysctl -n hw.ncpu`
make -j `sysctl -n hw.ncpu` || exit 3
echo "%%"
echo "%% Running test-erlang ..."
echo "%%"
./tests/test-erlang
./tests/test-erlang || exit 4
echo "%%"
echo "%% Running test-enif ..."
echo "%%"
./tests/test-enif
./tests/test-enif | exit 5
echo "%%"
echo "%% Running test-mailbox ..."
echo "%%"
./tests/test-mailbox
./tests/test-mailbox || exit 6
echo "%%"
echo "%% Running test-structs ..."
echo "%%"
./tests/test-structs
./tests/test-structs || exit 7
echo "%%"
echo "%% Running estdlib tests ..."
echo "%%"
./src/AtomVM tests/libs/estdlib/test_estdlib.avm
./src/AtomVM tests/libs/estdlib/test_estdlib.avm || exit 8
echo "%%"
echo "%% Running eavmlib tests ..."
echo "%%"
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm || exit 9
echo "%%"
echo "%% Running alisp tests ..."
echo "%%"
./src/AtomVM tests/libs/alisp/test_alisp.avm
./src/AtomVM tests/libs/alisp/test_alisp.avm || exit 10
echo "%%"
echo "%% Running install ..."
echo "%%"
make install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h
make install || exit 11
atomvm examples/erlang/hello_world.avm || exit 12
atomvm -v || exit 13
atomvm -h || exit 14
echo "%%"
echo "%% Done!"
echo "%%"
exit 0

0 comments on commit 29ed376

Please sign in to comment.