Skip to content

Commit 7f4dac2

Browse files
committed
ci: add minimal FreeBSD workflow
Run only app-luatest. That's a kind of a smoke test. Use `cross-platform-actions/action` to run a VM inside the job, Ninja to speed up building, ctest to avoid building gevent (test-run.py dependency). NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
1 parent fff4f43 commit 7f4dac2

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: freebsd
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
freebsd:
10+
# Run on a branch push and on a pull request from a fork. A pull request
11+
# from a branch of this repository is tested by the push of that branch.
12+
if: |
13+
github.event_name == 'push' ||
14+
github.event_name == 'pull_request' &&
15+
github.event.pull_request.head.repo.full_name != github.repository
16+
17+
runs-on: ubuntu-latest
18+
19+
timeout-minutes: 60
20+
21+
steps:
22+
- uses: actions/checkout@v7
23+
with:
24+
# The version of the build is `git describe` of the tree.
25+
fetch-depth: 0
26+
submodules: recursive
27+
28+
- name: Start FreeBSD VM
29+
uses: cross-platform-actions/action@v1
30+
with:
31+
operating_system: freebsd
32+
version: '15.1'
33+
# The default is 2: the CPU count of a standard Linux runner when
34+
# the option appeared (2023) and of a private repository's runner
35+
# now. A public repository's runner has 4.
36+
cpu_count: 4
37+
38+
- name: Install dependencies
39+
shell: cpa.sh {0}
40+
run: sudo pkg install -y cmake-core git-lite icu ninja readline
41+
42+
# Build only tarantool executable and files in test/app-luatest to
43+
# reduce the build time.
44+
- name: Build
45+
shell: cpa.sh {0}
46+
run: |
47+
cmake . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DTEST_BUILD=ON
48+
cmake --build . --target tarantool app-luatest-deps
49+
50+
# Use ctest (and not the usual test-run.py harness) to reduce dependencies
51+
# list (in particular, test-run.py needs gevent and gevent needs
52+
# compilation that would cost a time).
53+
#
54+
# http_client_test needs a gevent based http server.
55+
#
56+
# protobuf_module_test is known as unstable under ctest (gh-11728).
57+
- name: Run app-luatest
58+
shell: cpa.sh {0}
59+
run: |
60+
ctest -VV \
61+
--no-tests=error \
62+
--output-on-failure \
63+
-j $(nproc) \
64+
-L app-luatest \
65+
-E 'http_client_test|protobuf_module_test'

0 commit comments

Comments
 (0)