Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use meson for some portability #6

Merged
merged 23 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/c-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: '*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: make check
run: make check
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install meson ninja
- name: Configure Project
run: meson setup builddir
- name: Run Tests
run: meson test -C builddir -v
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# tests
ibuf_test
imsg_sendrcv

# libraries
libimsg.so.*

# vscode
.vscode

# pkgconfig files
libimsg.pc

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MANDIR = ${PREFIX}/share/man
SRCS = src/imsg.c src/imsg-buffer.c
OBJS = ${SRCS:.c=.o}

TESTSRCS = test/imsg_sendrcv.c
TESTSRCS = imsg_sendrcv ibuf_test
TESTOBJS = ${TESTSRCS:.c=.test}

all: ${LIBRARY} ${STATICLIB} libimsg.pc
Expand Down Expand Up @@ -52,7 +52,7 @@ check: test
test: all ${TESTOBJS}

${TESTOBJS}: ${TESTSRCS}
${CC} ${CFLAGS} -Isrc ${TESTSRCS} ${STATICLIB} -o $@
${CC} ${CFLAGS} -Isrc test/$@.c ${STATICLIB} -o $@
./$@

clean:
Expand Down
Loading