Skip to content

Commit 554c152

Browse files
committed
DO NOT MERGE: run the tests with test-run.py
NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
1 parent b750683 commit 554c152

2 files changed

Lines changed: 145 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: freebsd-test-run
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
freebsd-test-run:
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+
# DO NOT MERGE: several runs of the same job show the noise in timings.
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
run: [1, 2, 3, 4, 5]
22+
23+
# ubuntu-latest will be 26.04 soon. Switch ahead of time.
24+
#
25+
# https://github.com/actions/runner-images/issues/14748
26+
runs-on: ubuntu-26.04
27+
28+
timeout-minutes: 15
29+
30+
steps:
31+
# Speeds up actions/checkout.
32+
#
33+
# https://github.com/actions/checkout/issues/945
34+
- name: Parallelize submodules fetching
35+
run: git config --global submodule.fetchJobs 8
36+
37+
- uses: actions/checkout@v7
38+
with:
39+
# The version of the build is `git describe` of the tree.
40+
fetch-depth: 0
41+
submodules: recursive
42+
43+
- name: Start FreeBSD VM
44+
uses: cross-platform-actions/action@v1
45+
with:
46+
operating_system: freebsd
47+
version: '15.1'
48+
# The default is 2: the CPU count of a standard Linux runner when
49+
# the option appeared (2023) and of a private repository's runner
50+
# now. A public repository's runner has 4.
51+
cpu_count: 4
52+
53+
# FreeBSD offers only /dev/fd/{0,1,2} by default.
54+
#
55+
# luatest uses /dev/fd/* to point tarantool's logger to luatest's pipe.
56+
# If the file to write doesn't exist, the logger process fails:
57+
#
58+
# | /bin/sh: cannot create /dev/fd/15: Operation not supported
59+
#
60+
# Usually it happens in the background and is harmless, but sometimes the
61+
# logger fails fast enough, so log_pipe_init() sees it, reports up and
62+
# tarantool initialization fails.
63+
- name: Mount fdescfs
64+
shell: cpa.sh {0}
65+
run: sudo mount -t fdescfs null /dev/fd
66+
67+
# test-run.py needs Python with gevent and PyYAML.
68+
- name: Install dependencies
69+
shell: cpa.sh {0}
70+
run: |
71+
sudo pkg install -y cmake-core git-lite icu ninja readline \
72+
python3 py312-gevent py312-pyyaml
73+
74+
- name: Build
75+
shell: cpa.sh {0}
76+
run: |
77+
cmake . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DTEST_BUILD=ON
78+
cmake --build .
79+
80+
- name: Run tests
81+
shell: cpa.sh {0}
82+
run: cd test && ./test-run.py --force unit/ app-luatest/
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: macos-test-run
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
macos-test-run:
7+
# Run on a branch push and on a pull request from a fork. A pull request
8+
# from a branch of this repository is tested by the push of that branch.
9+
if: github.event_name == 'push' ||
10+
github.event_name == 'pull_request' &&
11+
github.event.pull_request.head.repo.full_name != github.repository
12+
13+
# DO NOT MERGE: several runs of the same job show the noise in timings.
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
run: [1, 2, 3, 4, 5]
18+
19+
runs-on: macos-latest
20+
21+
timeout-minutes: 15
22+
23+
steps:
24+
# Speeds up actions/checkout.
25+
#
26+
# https://github.com/actions/checkout/issues/945
27+
- name: Parallelize submodules fetching
28+
run: git config --global submodule.fetchJobs 8
29+
30+
- uses: actions/checkout@v7
31+
with:
32+
# The version of the build is `git describe` of the tree.
33+
fetch-depth: 0
34+
submodules: recursive
35+
36+
# test-run.py needs gevent and PyYAML. Homebrew's Python is externally
37+
# managed (PEP 668) and Homebrew has no gevent: PyPI's wheels in a venv.
38+
- name: Install dependencies
39+
run: |
40+
python3 -m venv "$HOME/venv"
41+
"$HOME/venv/bin/pip" install gevent pyyaml
42+
echo "$HOME/venv/bin" >> "$GITHUB_PATH"
43+
44+
- name: Build
45+
run: |
46+
cmake . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DTEST_BUILD=ON
47+
cmake --build .
48+
49+
# http_client_http_version_test.lua is known to be unstable on macOS
50+
# (gh-12587).
51+
- name: Run tests
52+
run: |
53+
cd test && ./test-run.py --force --exclude http_client_http_version \
54+
unit/ app-luatest/
55+
56+
- name: Upload failed test artifacts
57+
if: failure()
58+
uses: actions/upload-artifact@v7
59+
with:
60+
# DO NOT MERGE: an artifact name is unique within a workflow run.
61+
name: macos-test-run-${{ matrix.run }}
62+
retention-days: 21
63+
path: /tmp/t/artifacts

0 commit comments

Comments
 (0)