forked from OISF/suricata
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (130 loc) · 4 KB
/
docs.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
name: docs
on:
push:
paths:
# Something has to change in doc/ for thos workflow to be run.
- "doc/**"
pull_request:
workflow_dispatch:
inputs:
LIBHTP_REPO:
LIBHTP_BRANCH:
SU_REPO:
SU_BRANCH:
SV_REPO:
SV_BRANCH:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
env:
DEFAULT_CFLAGS: "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function"
# Apt sometimes likes to ask for user input, this will prevent that.
DEBIAN_FRONTEND: "noninteractive"
jobs:
prepare-deps:
name: Prepare dependencies
uses: ./.github/workflows/prepare-deps.yml
prepare-cbindgen:
name: Prepare cbindgen
runs-on: ubuntu-latest
steps:
- name: Cache ~/.cargo
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2
with:
path: ~/.cargo
key: ${{ github.job }}-cargo
- name: Installing Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
rustup target add x86_64-unknown-linux-musl
- name: Building static cbindgen for Linux
run: |
cargo install --target x86_64-unknown-linux-musl --debug cbindgen
cp $HOME/.cargo/bin/cbindgen .
- name: Uploading prep archive
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
with:
name: cbindgen
path: .
ubuntu-22-04-dist:
name: Ubuntu 22.04 Dist Builder
runs-on: ubuntu-latest
container: ubuntu:22.04
needs: [prepare-deps, prepare-cbindgen]
steps:
# Cache Rust stuff.
- name: Cache cargo registry
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2
with:
path: ~/.cargo
key: ${{ github.job }}-cargo
- name: Determine number of CPUs
run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
- run: apt update
- run: |
apt -y install \
autoconf \
automake \
build-essential \
cargo \
cmake \
curl \
git \
jq \
make \
libpcre3 \
libpcre3-dbg \
libpcre3-dev \
libpcre2-dev \
libtool \
libpcap-dev \
libnet1-dev \
libyaml-0-2 \
libyaml-dev \
libcap-ng-dev \
libcap-ng0 \
libmagic-dev \
libjansson-dev \
libjansson4 \
liblz4-dev \
libssl-dev \
liblzma-dev \
pkg-config \
python3 \
python3-yaml \
rustc \
sphinx-doc \
sphinx-common \
texlive-latex-base \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-latex-extra \
zlib1g \
zlib1g-dev
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- run: git config --global --add safe.directory /__w/suricata/suricata
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: prep
path: prep
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: cbindgen
path: prep
- name: Setup cbindgen
run: |
mkdir -p $HOME/.cargo/bin
cp prep/cbindgen $HOME/.cargo/bin
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: tar xf prep/libhtp.tar.gz
- run: tar xf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
- run: make dist
- run: test -e doc/userguide/suricata.1
- run: test -e doc/userguide/userguide.pdf
- name: Building HTML documentation
run: cd doc/userguide && make html