Skip to content

Commit d1a2f0e

Browse files
committed
Add build-and-test CI for FreeBSD
Signed-off-by: Fred Dushin <[email protected]>
1 parent 37d3ea9 commit d1a2f0e

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
#
2+
# Copyright 2023 Fred Dushin <[email protected]>
3+
#
4+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
5+
#
6+
7+
name: build-and-test-on-freebsd
8+
9+
on:
10+
push:
11+
paths-ignore:
12+
- 'src/platforms/esp32/**'
13+
- 'src/platforms/stm32/**'
14+
- 'doc/**'
15+
- 'LICENSES/**'
16+
- '*.Md'
17+
- '*.md'
18+
pull_request:
19+
paths-ignore:
20+
- 'src/platforms/esp32/**'
21+
- 'src/platforms/stm32/**'
22+
- 'doc/**'
23+
- 'LICENSES/**'
24+
- '*.Md'
25+
- '*.md'
26+
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }}
29+
cancel-in-progress: true
30+
31+
jobs:
32+
build-and-test-on-freebsd:
33+
runs-on: macos-12
34+
name: Build and test AtomVM on FreeBSD
35+
env:
36+
ATOMVM_EXAMPLE: "atomvm-example"
37+
steps:
38+
39+
- uses: actions/checkout@v3
40+
41+
- name: Build and Test on FreeBSD
42+
id: build-and-test-on-freebsd
43+
uses: vmactions/freebsd-vm@v0
44+
with:
45+
envs: 'ATOMVM_EXAMPLE'
46+
usesh: true
47+
sync: rsync
48+
copyback: false
49+
50+
prepare: |
51+
pkg install -y curl cmake gperf erlang elixir
52+
53+
run: |
54+
55+
echo "%%"
56+
echo "%% System Info"
57+
echo "%%"
58+
echo "**freebsd-version:**"
59+
freebsd-version
60+
echo "**uname:**"
61+
uname -a
62+
echo "**C Compiler version:**"
63+
clang --version
64+
clang++ --version
65+
echo "**CMake version:**"
66+
cmake --version
67+
echo "**hw.ncpu:**"
68+
sysctl -n hw.ncpu
69+
70+
echo "%%"
71+
echo "%% Running CMake ..."
72+
echo "%%"
73+
mkdir build
74+
cd build
75+
cmake ..
76+
77+
echo "%%"
78+
echo "%% Building AtomVM ..."
79+
echo "%%"
80+
make -j `sysctl -n hw.ncpu`
81+
82+
echo "%%"
83+
echo "%% Running test-erlang ..."
84+
echo "%%"
85+
./tests/test-erlang
86+
87+
echo "%%"
88+
echo "%% Running test-enif ..."
89+
echo "%%"
90+
./tests/test-enif
91+
92+
echo "%%"
93+
echo "%% Running test-mailbox ..."
94+
echo "%%"
95+
./tests/test-mailbox
96+
97+
echo "%%"
98+
echo "%% Running test-structs ..."
99+
echo "%%"
100+
./tests/test-structs
101+
102+
echo "%%"
103+
echo "%% Running estdlib tests ..."
104+
echo "%%"
105+
./src/AtomVM tests/libs/estdlib/test_estdlib.avm
106+
107+
echo "%%"
108+
echo "%% Running eavmlib tests ..."
109+
echo "%%"
110+
./src/AtomVM tests/libs/eavmlib/test_eavmlib.avm
111+
112+
echo "%%"
113+
echo "%% Running alisp tests ..."
114+
echo "%%"
115+
./src/AtomVM tests/libs/alisp/test_alisp.avm
116+
117+
echo "%%"
118+
echo "%% Running install ..."
119+
echo "%%"
120+
make install
121+
atomvm examples/erlang/hello_world.avm
122+
atomvm -v
123+
atomvm -h
124+
125+
echo "%%"
126+
echo "%% Done!"
127+
echo "%%"

0 commit comments

Comments
 (0)