forked from shramov/tll
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (68 loc) · 2.82 KB
/
ci.yml
File metadata and controls
77 lines (68 loc) · 2.82 KB
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
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v4
with:
path: |
/home/runner/.ccache
/home/runner/.cache/ccache
/Users/runner/Library/Caches/ccache
key: ccache:${{ matrix.os }}:${{ github.sha }}
restore-keys: 'ccache:${{ matrix.os }}:'
- name: disable man-db trigger # See https://github.com/actions/runner-images/issues/10977
if: ${{ runner.os == 'Linux' }}
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate
sudo dpkg-reconfigure man-db
- name: install deps
if: ${{ runner.os == 'Linux' }}
run: |
echo deb https://psha.org.ru/debian/ `echo ${{ matrix.os }} | tr -d -` contrib backports | sudo tee /etc/apt/sources.list.d/psha.org.ru.list
sudo wget -O/etc/apt/trusted.gpg.d/psha.org.ru.gpg https://psha.org.ru/debian/pubkey.gpg
sudo apt update
sudo apt install ccache cmake meson pkg-config libfmt-dev libyaml-dev zlib1g-dev liblz4-dev libspdlog-dev rapidjson-dev libgtest-dev googletest librhash-dev python3-dev python3-pytest python3-yaml python3-lz4 python3-decorator
python3 -m venv venv --system-site-packages
. venv/bin/activate
echo "$VIRTUAL_ENV/bin" >> "$GITHUB_PATH"
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
pip install cython
- name: install deps macos
if: ${{ runner.os == 'macOS' }}
run: |
brew install ccache meson fmt spdlog rapidjson rhash googletest
python3 -m venv venv
. venv/bin/activate
echo "$VIRTUAL_ENV/bin" >> "$GITHUB_PATH"
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV"
pip install cython setuptools pytest pyyaml lz4 decorator
- name: configure
# env:
# CC: ccache ${{ matrix.compiler }}
# CXX: ccache ${{ matrix.compiler }} -xc++
run: |
# Workaround libc++ deprecation warning, will be fixed in meson 1.9
# https://github.com/mesonbuild/meson/issues/14856
test ${{runner.os}} == "macOS" && export CXXFLAGS=-U_LIBCPP_ENABLE_ASSERTIONS
meson setup build
- name: build
run: ninja -vC build -j2
- name: pybuild
run: |
cd python
python3 setup.py build_ext --inplace --include-dirs=../src:../build/src --library-dirs=../build/src --rpath=`pwd`/../build/src
- name: test
continue-on-error: ${{ runner.os == 'macOS' }}
run: |
meson test -C build --no-rebuild --print-errorlogs -v
cd python
python3 -m pytest --log-level=DEBUG --log-format='%(relativeCreated) 10.3f %(levelname)-7s %(name)s: %(message)s' -v
# vim: sts=2 sw=2 et