-
Notifications
You must be signed in to change notification settings - Fork 12
98 lines (93 loc) · 3.15 KB
/
Copy pathci.yml
File metadata and controls
98 lines (93 loc) · 3.15 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on: [push, pull_request]
jobs:
lua:
strategy:
fail-fast: false
matrix:
os: [linux, macos, macos-arm64]
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, lua=5.5, luajit=2.0, luajit=2.1]
include:
- os: linux
runner: ubuntu-latest
- os: macos
runner: macos-15-intel
- os: macos-arm64
runner: macos-latest
exclude:
- os: macos-arm64
lua: luajit=2.0
name: ${{ matrix.os }} (${{ matrix.lua }})
runs-on: ${{ matrix.runner }}
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v6
- name: Install libreadline
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libreadline-dev
- name: Install Lua (${{ matrix.lua }})
run: |
pip install git+https://github.com/luarocks/hererocks
hererocks lua_install -r^ --${{ matrix.lua }}
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
- name: Build lua-simdjson
run: |
source lua_install/bin/activate
luarocks make
- name: Run tests
run: |
source lua_install/bin/activate
luarocks install lua-cjson2
luarocks install busted
busted --verbose
windows:
strategy:
fail-fast: false
matrix:
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, lua=5.5, luajit=2.0, luajit=2.1]
target: [mingw,vs]
runs-on: windows-2022
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v6
- name: Install Lua (${{ matrix.lua }})
run: |
pip install git+https://github.com/luarocks/hererocks
hererocks lua_install -r^ --${{ matrix.lua }} --target ${{ matrix.target }}
- name: Build lua-simdjson
run: |
.\lua_install\bin\activate
luarocks make
- name: Run tests
run: |
.\lua_install\bin\activate
luarocks install lua-cjson2
luarocks install busted
busted --verbose
sanitizers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libreadline-dev
pip install git+https://github.com/luarocks/hererocks
hererocks lua_install -r^ --lua=5.4
- name: Build with AddressSanitizer and UndefinedBehaviorSanitizer
run: |
source lua_install/bin/activate
luarocks config variables.LIBFLAG -- "-shared -fsanitize=address,undefined"
CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
luarocks make
- name: Run tests with sanitizers
run: |
source lua_install/bin/activate
luarocks install lua-cjson2
luarocks install busted
export LD_PRELOAD="$(gcc -print-file-name=libasan.so):$(g++ -print-file-name=libstdc++.so):$(gcc -print-file-name=libubsan.so)"
export ASAN_OPTIONS="detect_leaks=1:halt_on_error=1"
export UBSAN_OPTIONS="halt_on_error=1:print_stacktrace=1"
busted --verbose