Skip to content

Add support for node() bif #3750

Add support for node() bif

Add support for node() bif #3750

#
# Copyright 2017-2022 Davide Bettio <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#
name: Build and Test on macOS
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:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-12", "macos-13", "macos-14", "macos-15"]
otp: ["24", "25", "26", "27"]
steps:
# Setup
- name: "Checkout repo"
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: "Install deps"
if: matrix.otp != '24'
run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} ninja mbedtls rebar3
- name: "Install deps"
if: matrix.otp == '24'
run: |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} ninja mbedtls
wget https://github.com/erlang/rebar3/releases/download/3.23.0/rebar3
chmod +x rebar3
if [ -e /usr/local/opt/erlang@24/bin/ ] ; then
sudo cp rebar3 /usr/local/opt/erlang@24/bin/
fi
if [ -e /opt/homebrew/opt/erlang@24/bin/ ] ; then
sudo cp rebar3 /opt/homebrew/opt/erlang@24/bin/
fi
# Builder info
- name: "System info"
run: |
echo "**uname:**"
uname -a
echo "**C Compiler version:**"
clang --version
clang++ --version
echo "**CMake version:**"
cmake --version
# Build
- name: "Build: create build dir"
run: mkdir build
- name: "Build: run cmake"
working-directory: build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:/opt/homebrew/opt/erlang@${{ matrix.otp }}/bin:$PATH"
cmake -DAVM_WARNINGS_ARE_ERRORS=ON -G Ninja ..
- name: "Build: run ninja"
working-directory: build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:/opt/homebrew/opt/erlang@${{ matrix.otp }}/bin:$PATH"
ninja
- name: "Build: run dialyzer"
working-directory: build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:/opt/homebrew/opt/erlang@${{ matrix.otp }}/bin:$PATH"
ninja dialyzer
# Test
- name: "Test: test-erlang"
timeout-minutes: 10
working-directory: build
run: |
./tests/test-erlang
- name: "Test: test-enif"
working-directory: build
run: |
./tests/test-enif
- name: "Test: test-mailbox"
working-directory: build
run: |
./tests/test-mailbox
- name: "Test: test-structs"
timeout-minutes: 10
working-directory: build
run: |
./tests/test-structs
- name: "Test: test_etest.avm"
timeout-minutes: 5
working-directory: build
run: |
./src/AtomVM ./tests/libs/etest/test_etest.avm
- name: "Test: test_estdlib.avm"
timeout-minutes: 10
working-directory: build
run: |
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
- name: "Test: test_eavmlib.avm"
timeout-minutes: 10
working-directory: build
run: |
./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
- name: "Test: test_alisp.avm"
timeout-minutes: 10
working-directory: build
run: |
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
- name: "Install and smoke test"
working-directory: build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:/opt/homebrew/opt/erlang@${{ matrix.otp }}/bin:$PATH"
sudo ninja install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h