Skip to content

Commit b3341b7

Browse files
committed
test
1 parent 6c578f6 commit b3341b7

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- name: Checkout
13+
uses: actions/checkout@v4
1314

14-
- uses: actions/setup-python@v4
15-
with: { python-version: "3.12" }
15+
- name: Install python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
1619

1720
- name: Install clang-format
1821
run: pip3 install clang-format
@@ -21,27 +24,40 @@ jobs:
2124
run: ./scripts/lint.sh
2225

2326
build:
24-
name: Build and Test on ${{ matrix.os }} with Meson v${{ matrix.meson_version }}
27+
name: Build and Test on ${{ matrix.os }} with ${{ matrix.compiler.cpp }}
2528
runs-on: ${{ matrix.os }}
2629
strategy:
2730
matrix:
28-
os: [ubuntu-latest, macos-latest, windows-latest]
29-
meson_version: ["1.2.0", "1.3.0", "1.4.0"]
31+
os: [ubuntu-latest]
32+
meson_version: ["1.4.1"]
33+
compiler: [{ cpp: g++, c: gcc }, { cpp: clang++, c: clang }]
34+
build: ["debugoptimized", "release"]
35+
sanitize: ["thread", "memory", "leak", "address,undefined"]
36+
3037
steps:
31-
- name: Checkout code
38+
- name: Checkout
3239
uses: actions/checkout@v4
33-
- name: Set up Python
40+
41+
- name: Install Python
3442
uses: actions/setup-python@v5
3543
with:
36-
python-version: "3.x"
37-
- name: Install dependencies
44+
python-version: "3.12"
45+
46+
- name: Install python dependencies
3847
run: python -m pip install meson==${{ matrix.meson_version }} ninja
48+
49+
- name: Install hwloc
50+
run: sudo apt install libhwloc-dev
51+
3952
- name: Configure Project
40-
run: meson setup builddir/
53+
run: meson setup builddir/ -buildtype=${{ matrix.buildtype }} -Db_sanitize=${{ matrix.santitize }} -Db_ndebug=if-release -Dlf_test=true -Db_lundef=false
4154
env:
42-
CC: gcc
55+
CC: ${{ matrix.compiler.c }}
56+
CXX: ${{ matrix.compiler.cpp }}
57+
4358
- name: Run Tests
4459
run: meson test -C builddir/ -v
60+
4561
- name: Upload Test Log
4662
uses: actions/upload-artifact@v4
4763
if: failure()

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ libfork_dep = declare_dependency(
5454

5555
# === Optional ===
5656

57-
if get_option('test')
57+
if get_option('lf_test')
5858
subdir('test')
5959
endif
6060

meson_options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Option to enable or disable tests
2-
option('test', type: 'boolean', value: true, description: 'Build test suite')
2+
option('lf_test', type: 'boolean', value: true, description: 'Build test suite')

0 commit comments

Comments
 (0)