Skip to content

Commit ccb211a

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's dependency). NO_DOC=ci NO_CHANGELOG=ci NO_TEST=ci
1 parent 187d439 commit ccb211a

1 file changed

Lines changed: 87 additions & 0 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
# ubuntu-latest will be 26.04 soon. Switch ahead of time.
18+
#
19+
# https://github.com/actions/runner-images/issues/14748
20+
runs-on: ubuntu-26.04
21+
22+
timeout-minutes: 15
23+
24+
steps:
25+
- uses: actions/checkout@v7
26+
with:
27+
# The version of the build is `git describe` of the tree.
28+
fetch-depth: 0
29+
submodules: recursive
30+
31+
- name: Start FreeBSD VM
32+
uses: cross-platform-actions/action@v1
33+
with:
34+
operating_system: freebsd
35+
version: '15.1'
36+
# The default is 2: the CPU count of a standard Linux runner when
37+
# the option appeared (2023) and of a private repository's runner
38+
# now. A public repository's runner has 4.
39+
cpu_count: 4
40+
41+
# FreeBSD offers only /dev/fd/{0,1,2} by default.
42+
#
43+
# luatest uses /dev/fd/* to point tarantool's logger to luatest's pipe.
44+
# If the file to write doesn't exist, the logger process fails:
45+
#
46+
# | /bin/sh: cannot create /dev/fd/15: Operation not supported
47+
#
48+
# Usually it happens in the background and is harmless, but sometimes the
49+
# logger fails fast enough, so log_pipe_init() sees it, reports up and
50+
# tarantool initialization fails.
51+
- name: Mount fdescfs
52+
shell: cpa.sh {0}
53+
run: sudo mount -t fdescfs null /dev/fd
54+
55+
- name: Install dependencies
56+
shell: cpa.sh {0}
57+
run: sudo pkg install -y cmake-core git-lite icu ninja readline
58+
59+
# Build only the tarantool executable and the files in test/app-luatest to
60+
# reduce the build time.
61+
- name: Build
62+
shell: cpa.sh {0}
63+
run: |
64+
cmake . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DTEST_BUILD=ON
65+
cmake --build . --target tarantool app-luatest-deps
66+
67+
# Use ctest (and not the usual test-run.py harness) to reduce the list of
68+
# dependencies (in particular, test-run.py needs gevent and gevent needs
69+
# compilation that takes time).
70+
#
71+
# http_client_test needs a gevent based http server.
72+
#
73+
# protobuf_module_test is known to be unstable under ctest (gh-11728).
74+
#
75+
# gh_8613_centralized_config_options_test.lua and
76+
# gh_8613_new_cli_behaviour_test.lua are likely the same; re-test after
77+
# gh-11728.
78+
- name: Run app-luatest
79+
shell: cpa.sh {0}
80+
run: |
81+
ctest \
82+
--no-tests=error \
83+
--output-on-failure \
84+
--timeout 120 \
85+
-j $(nproc) \
86+
-L app-luatest \
87+
-E 'http_client_test|protobuf_module_test|gh_8613'

0 commit comments

Comments
 (0)