-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (42 loc) · 1.17 KB
/
build.yml
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
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: build static binary
run: make mh-static OPTS=-lpthread
- name: 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: update brew
run: brew update
- name: install libs
run: brew install pcre2 cmocka
- name: Install dependencies
run: |
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> $GITHUB_ENV
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> $GITHUB_ENV
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> $GITHUB_ENV
- name: build
run: |
make mh CC=clang LIBS="$(pkg-config --cflags --libs libpcre2-8) -lpthread" PROGNAME=mh-$(uname -o | tr '[:upper:]' '[:lower:]')-$(uname -m)