add default source macro #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: mh CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install deps | |
run: sudo make deb-install-deps | |
- name: make mh | |
run: make mh | |
- name: make test | |
run: make test | |
build-osx: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for Homebrew | |
run: | | |
if test ! $(which brew); then | |
echo "Homebrew not found" | |
exit 1 | |
fi | |
- name: | |
run: brew update | |
- name: | |
run: brew install pcre2 cmocka | |
- name: build | |
run: | | |
cc --version | |
brew --prefix pcre2 | |
brew --prefix cmocka | |
cc -D_DEFAULT_SOURCE -o mh -D VERSION=\"aa30377\" queue.c mh.c main.c -Wall $(pkg-config --cflags --libs libpcre2-8) |