-
Notifications
You must be signed in to change notification settings - Fork 1.4k
150 lines (143 loc) · 4.3 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Build and test
on: [push, pull_request]
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
standard-build:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- "--enable-debug --enable-cuckoo --enable-magic --enable-macho --enable-pb-tests --enable-address-sanitizer --enable-undefined-behaviour-sanitizer"
- "--enable-debug --enable-profiling --enable-cuckoo --enable-magic --enable-macho --enable-pb-tests --enable-address-sanitizer --enable-undefined-behaviour-sanitizer"
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
gcc-multilib \
libtool \
libjansson-dev \
libmagic-dev \
libssl-dev \
protobuf-compiler \
protobuf-c-compiler \
libprotobuf-c-dev
- name: Print versions
run: |
bison --version
gcc --version
- name: Prepare for building
run: |
./bootstrap.sh
./configure ${{ matrix.config }}
- name: Build
run: make clean && make
- name: Run tests
run: make check
- name: Print tests errors
if: ${{ failure() }}
run: cat test-suite.log
mingw-build:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- "--host=x86_64-w64-mingw32"
- "--host=i686-w64-mingw32"
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
libtool \
libssl-dev \
gcc-mingw-w64
- name: Prepare for building
run: |
./bootstrap.sh
./configure ${{ matrix.config }}
- name: Build
run: make clean && make
macosx-build:
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install \
autoconf \
automake \
bison \
flex \
libtool \
pkg-config \
jansson \
libmagic \
openssl@3 \
protobuf \
protobuf-c
- name: Print versions
run: |
bison --version
gcc --version
- name: Prepare for building
run: |
./bootstrap.sh
./configure --enable-debug --enable-cuckoo --enable-magic --enable-macho --enable-pb-tests
- name: Build
run: make clean && make
- name: Run tests
run: make check
- name: Print tests errors
if: ${{ failure() }}
run: cat test-suite.log
bazel-build:
# The ubuntu-20.04 virtual environment has Bazel installed, see:
# https://github.com/actions/virtual-environments
runs-on: ubuntu-20.04
steps:
# Caches and restores the bazelisk download directory.
- name: Cache bazelisk download
uses: actions/cache@v2
env:
cache-name: bazel-cache
with:
path: ~/.cache/bazelisk
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-development
- uses: actions/checkout@v2
- name: Build
run: bazel build @jansson//... //tests/...
- name: Run tests
run: bazel test --test_output=errors //tests/...
bigendian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup multiarch/qemu-user-static
run: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: ubuntu-core:s390x-focal
uses: docker://multiarch/ubuntu-core:s390x-focal
with:
args: >
bash -c
"
apt-get update -y &&
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata &&
apt-get install -y automake libtool make gcc pkg-config bison git &&
cd /github/workspace &&
./bootstrap.sh &&
./configure --disable-proc-scan --enable-macho &&
make &&
make check &&
cat test-suite.log
"