forked from OISF/suricata
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (97 loc) · 3.42 KB
/
commits.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
name: commit-check
on:
- pull_request
permissions: read-all
env:
DEBIAN_FRONTEND: "noninteractive"
jobs:
check-commits:
name: Commit Check
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- name: Caching ~/.cargo
uses: actions/cache@f4278025ab0f432ce369118909e46deec636f50c
with:
path: ~/.cargo
key: commit-check-cargo
- name: Install dependencies
run: |
apt update
apt -y install \
libpcre2-dev \
build-essential \
autoconf \
automake \
cargo \
curl \
git \
jq \
libtool \
libpcap-dev \
libnet1-dev \
libyaml-0-2 \
libyaml-dev \
libcap-ng-dev \
libcap-ng0 \
libmagic-dev \
libnetfilter-queue-dev \
libnetfilter-queue1 \
libnfnetlink-dev \
libnfnetlink0 \
libhiredis-dev \
libjansson-dev \
libevent-dev \
libevent-pthreads-2.1-7 \
libjansson-dev \
libpython2.7 \
libssl-dev \
make \
parallel \
pkg-config \
python3-yaml \
rustc \
software-properties-common \
zlib1g \
zlib1g-dev
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Installing sccache
run: |
(cd /tmp && curl -OL https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz)
mkdir -p "$HOME/.cargo/bin"
(cd "$HOME/.cargo/bin" && tar xvf /tmp/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz --strip-components=1 --wildcards '*/sccache')
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Install cbindgen
run: |
cd $HOME/.cargo/bin
curl -OL https://github.com/eqrion/cbindgen/releases/download/v0.15.0/cbindgen
chmod 755 cbindgen
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
# The action above is supposed to do this for us, but it doesn't appear to stick.
- run: /usr/bin/git config --global --add safe.directory /__w/suricata/suricata
- run: git fetch
- run: git clone https://github.com/OISF/libhtp -b 0.5.x
- name: Building all commits
run: |
echo "Building commits from ${GITHUB_BASE_REF}."
for rev in $(git rev-list --reverse origin/${GITHUB_BASE_REF}...); do
git checkout $rev
echo "Building rev ${rev}" | tee -a build_log.txt
./autogen.sh >> build_log.txt 2>&1
CC="sccache gcc" ./configure --enable-unittests >> build_log.txt 2>&1
if ! make -j2 >> build_log.txt 2>&1; then
echo "::error ::Failed to build rev ${rev}"
tail -n 50 build_log.txt
exit 1
fi
make -ik distclean > /dev/null
done
- run: sccache -s
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
name: Uploading build log
if: always()
with:
name: build_log
path: build_log.txt