Merge pull request #1878 from pguyot/w40/run-tests-on-aarch64-runner #3325
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2023 Fred Dushin <fred@dushin.net> | |
# | |
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | |
# | |
name: build-and-test-on-freebsd | |
on: | |
push: | |
paths-ignore: | |
- 'src/platforms/emscripten/**' | |
- 'src/platforms/esp32/**' | |
- 'src/platforms/rp2/**' | |
- 'src/platforms/stm32/**' | |
- 'doc/**' | |
- 'LICENSES/**' | |
- '*.Md' | |
- '*.md' | |
pull_request: | |
paths-ignore: | |
- 'src/platforms/emscripten/**' | |
- 'src/platforms/esp32/**' | |
- 'src/platforms/rp2/**' | |
- 'src/platforms/stm32/**' | |
- 'doc/**' | |
- 'LICENSES/**' | |
- '*.Md' | |
- '*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test-on-freebsd: | |
runs-on: ubuntu-24.04 | |
name: Build and test AtomVM on FreeBSD | |
env: | |
ATOMVM_EXAMPLE: "atomvm-example" | |
strategy: | |
fail-fast: false | |
matrix: | |
os_release: ["13.4", "14.2"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build and Test on FreeBSD | |
id: build-and-test-on-freebsd | |
uses: vmactions/freebsd-vm@v1 | |
timeout-minutes: 20 | |
with: | |
release: ${{ matrix.os_release }} | |
envs: 'ATOMVM_EXAMPLE' | |
usesh: true | |
sync: rsync | |
copyback: false | |
- name: "Install deps" | |
shell: freebsd {0} | |
run: | | |
pkg install -y curl cmake gperf erlang elixir rebar3 mbedtls3 | |
- name: "System info" | |
shell: freebsd {0} | |
run: | | |
set -e | |
echo "%%" | |
echo "%% System Info" | |
echo "%%" | |
echo "**freebsd-version:**" | |
freebsd-version | |
echo "**uname:**" | |
uname -a | |
echo "**C Compiler version:**" | |
clang --version | |
clang++ --version | |
echo "**CMake version:**" | |
cmake --version | |
echo "**hw.ncpu:**" | |
sysctl -n hw.ncpu | |
- name: Disable eavmlib's test_http_server | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
sed -i '' 's/test_http_server/%test_http_server/g' tests/libs/eavmlib/tests.erl | |
- name: "Build: create build dir" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
mkdir build | |
- name: "Build: run cmake" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
cmake .. -DMBEDTLS_ROOT_DIR=/usr/local -DAVM_WARNINGS_ARE_ERRORS=ON | |
- name: "Build: run make" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
make -j `sysctl -n hw.ncpu` | |
- name: "Build: run dialyzer" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
make -j `sysctl -n hw.ncpu` | |
- name: "Test: test-erlang" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./tests/test-erlang | |
- name: "Test: test-enif" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./tests/test-enif | |
- name: "Test: test-heap" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./tests/test-heap | |
- name: "Test: test-mailbox" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./tests/test-mailbox | |
- name: "Test: test-structs" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./tests/test-structs | |
- name: "Test: test_etest.avm" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./src/AtomVM tests/libs/etest/test_etest.avm | |
- name: "Test: test_estdlib.avm" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./src/AtomVM tests/libs/estdlib/test_estdlib.avm | |
- name: "Test: test_eavmlib.avm" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm | |
- name: "Test: test_alisp.avm" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./src/AtomVM tests/libs/alisp/test_alisp.avm | |
- name: "Test: Tests.avm (Elixir)" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
./src/AtomVM ./tests/libs/exavmlib/Tests.avm | |
- name: "Install and smoke test" | |
shell: freebsd {0} | |
run: | | |
cd $GITHUB_WORKSPACE; | |
cd build | |
make install | |
atomvm examples/erlang/hello_world.avm | |
atomvm -v | |
atomvm -h |