From 6d7ff70da3afde3d2f405a993572eb6739ce9374 Mon Sep 17 00:00:00 2001 From: Winford Date: Sun, 19 Jan 2025 04:09:31 +0000 Subject: [PATCH] Make build-and-test-on-freebsd fail if steps to not complete successfully 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 --- .../workflows/build-and-test-on-freebsd.yaml | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-and-test-on-freebsd.yaml b/.github/workflows/build-and-test-on-freebsd.yaml index adaa6bd2f..ee36ab5e9 100644 --- a/.github/workflows/build-and-test-on-freebsd.yaml +++ b/.github/workflows/build-and-test-on-freebsd.yaml @@ -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 @@ -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!"