Skip to content

Merge pull request #879 from UncleGrumpy/nif_collection_resolve_nif_cb #2426

Merge pull request #879 from UncleGrumpy/nif_collection_resolve_nif_cb

Merge pull request #879 from UncleGrumpy/nif_collection_resolve_nif_cb #2426

#
# Copyright 2017-2022 Davide Bettio <davide@uninstall.it>
#
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
#
name: Build and Test on macOS
on:
push:
paths-ignore:
- 'src/platforms/esp32/**'
- 'src/platforms/stm32/**'
- 'doc/**'
- 'LICENSES/**'
- '*.Md'
pull_request:
paths-ignore:
- 'src/platforms/esp32/**'
- 'src/platforms/stm32/**'
- 'doc/**'
- 'LICENSES/**'
- '*.Md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-11"]
otp: ["24", "25", "26"]
steps:
# Setup
- name: "Checkout repo"
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: "Install deps"
run: brew install gperf doxygen erlang@${{ matrix.otp }} ninja
# 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:$PATH"
cmake -G Ninja -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
- name: "Build: run ninja"
working-directory: build
run: |
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:$PATH"
ninja
- name: "Build: run dialyzer"
working-directory: build
run: |
export PATH="/usr/local/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_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:$PATH"
sudo ninja install
atomvm examples/erlang/hello_world.avm
atomvm -v
atomvm -h