Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build-and-test CI for FreeBSD #866

Merged
merged 1 commit into from
Oct 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/build-and-test-on-freebsd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#
# 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/esp32/**'
- 'src/platforms/stm32/**'
- 'doc/**'
- 'LICENSES/**'
- '*.Md'
- '*.md'
pull_request:
paths-ignore:
- 'src/platforms/esp32/**'
- 'src/platforms/stm32/**'
- 'doc/**'
- 'LICENSES/**'
- '*.Md'
- '*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build-and-test-on-freebsd:
runs-on: macos-12
name: Build and test AtomVM on FreeBSD
env:
ATOMVM_EXAMPLE: "atomvm-example"
steps:

- uses: actions/checkout@v3

- name: Build and Test on FreeBSD
id: build-and-test-on-freebsd
uses: vmactions/freebsd-vm@v0
with:
envs: 'ATOMVM_EXAMPLE'
usesh: true
sync: rsync
copyback: false

prepare: |
pkg install -y curl cmake gperf erlang elixir

run: |

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

echo "%%"
echo "%% Running CMake ..."
echo "%%"
mkdir build
cd build
cmake ..

echo "%%"
echo "%% Building AtomVM ..."
echo "%%"
make -j `sysctl -n hw.ncpu`

echo "%%"
echo "%% Running test-erlang ..."
echo "%%"
./tests/test-erlang

echo "%%"
echo "%% Running test-enif ..."
echo "%%"
./tests/test-enif

echo "%%"
echo "%% Running test-mailbox ..."
echo "%%"
./tests/test-mailbox

echo "%%"
echo "%% Running test-structs ..."
echo "%%"
./tests/test-structs

echo "%%"
echo "%% Running estdlib tests ..."
echo "%%"
./src/AtomVM tests/libs/estdlib/test_estdlib.avm

echo "%%"
echo "%% Running eavmlib tests ..."
echo "%%"
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm

echo "%%"
echo "%% Running alisp tests ..."
echo "%%"
./src/AtomVM tests/libs/alisp/test_alisp.avm

echo "%%"
echo "%% Running install ..."
echo "%%"
make install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h

echo "%%"
echo "%% Done!"
echo "%%"