-
Notifications
You must be signed in to change notification settings - Fork 105
127 lines (107 loc) · 2.87 KB
/
build-and-test-on-freebsd.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
#
# 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 "%%"