-
Notifications
You must be signed in to change notification settings - Fork 106
134 lines (115 loc) · 3.41 KB
/
build-and-test-macos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#
# 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/rp2040/**'
- 'src/platforms/stm32/**'
- 'doc/**'
- 'LICENSES/**'
- '*.Md'
- '*.md'
pull_request:
paths-ignore:
- 'src/platforms/emscripten/**'
- 'src/platforms/esp32/**'
- 'src/platforms/rp2040/**'
- '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-13", "macos-14"]
otp: ["24", "25", "26"]
steps:
# Setup
- name: "Checkout repo"
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: "Install deps"
run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gperf doxygen erlang@${{ matrix.otp }} ninja mbedtls
# 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_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