-
Notifications
You must be signed in to change notification settings - Fork 192
166 lines (143 loc) · 5.18 KB
/
continuous-integration-pip.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# This file based on https://gist.github.com/mwouts/9842452d020c08faf9e84a3bba38a66f
# See: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
# 2022-08-06 - slg - Updated os to be 'macos-latest', 'ubuntu-20.04', 'ubuntu-22.04'
# See https://github.com/actions/virtual-environments for details.
# 2020-06-22 - slg - customized
# 2020-06-27 - slg - expanded to G++ for MacOS
# 2020-07-03 - slg - ported to be13_api; removed python (be13_api doesn't use python)
# 2021-05-07 - slg - Started work again
# 2022-02-10 - slg - renamed be20_api. Our work here is done.
name: BE2 Unit Tests on MacOS and Ubuntu (c++17)
on:
push:
branches:
- '**' # This will trigger the action for all branches
pull_request:
branches:
- main # Specify the branches for which pull_request events should trigger the action
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-22.04]
platform: [x64, arm64]
runs-on: ${{ matrix.os }}
env:
DEBUG_5G: FALSE
DEBUG_FAST: TRUE
MAKE_OPTS: -j2
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Extract Version from configure.ac
id: extract_version
run: |
echo "::set-output name=version::$(grep 'AC_INIT(\[BULK_EXTRACTOR\]' configure.ac| cut -d',' -f2 | tr -d "[]")"
# Conditional step for push events
- name: Run on push
if: github.event_name == 'push'
run: echo "This runs on a push to any branch"
# Conditional step for pull_request events
- name: Run on pull request
if: github.event_name == 'pull_request'
run: echo "This runs on a pull request to the main branch"
- name: "MacOS: run CONFIGURE_MACOS.bash"
if: startsWith(matrix.os, 'macos')
run: |
source $HOME/.bashrc
echo "" | bash etc/CONFIGURE_MACOS.bash
- name: "Ubuntu: run CONFIGURE_UBUNTU22LTS.bash"
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "" | bash etc/CONFIGURE_UBUNTU22LTS.bash
- name: Version Numbers
run: |
source $HOME/.bashrc
autoconf --version
automake --version
aclocal --version
gcc --version
g++ --version
- name: printenv
run: |
printenv
- name: Files
run: |
find . -print
- name: Make configure script
run: |
bash bootstrap.sh
- name: Dump configure script
run: |
cat configure
- name: C++ checks not optimizaiton with address-sanitizer (Mac and Linux)
run: |
source $HOME/.bashrc
./configure --disable-opt --enable-address-sanitizer
echo == config.h ==
cat config.h
echo ==============
make $MAKE_OPTS all
pushd src
make $MAKE_OPTS bulk_extractor
make check || (cat test-suite.log; exit 1)
popd
make distclean
- name: C++ checks optimization with address-sanitizer (Mac and Linux)
run: |
echo === Try Address Sanitizer Optimization ===
source $HOME/.bashrc
./configure --enable-address-sanitizer --enable-silent-rules --quiet
make $MAKE_OPTS all
pushd src
make $MAKE_OPTS bulk_extractor
make check || (cat test-suite.log; exit 1)
popd
make distclean
- name: C++ checks with thread-sanitizer on ubuntu are disabled
if: startsWith(matrix.os, 'ubuntu-DISABLED')
run: |
source $HOME/.bashrc
bash bootstrap.sh
./configure --enable-thread-sanitizer --enable-silent-rules --quiet
make clean
make $MAKE_OPTS all
pushd src
make $MAKE_OPTS bulk_extractor
make check || (cat test-suite.log; exit 1)
popd
make distclean
- name: C++ checks with codecov
if: startsWith(matrix.os, 'ubuntu')
run: |
source $HOME/.bashrc
bash bootstrap.sh
./configure --disable-opt CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' CXXFLAGS='-g -O0 -fprofile-arcs -ftest-coverage' --enable-silent-rules --quiet
make clean
make $MAKE_OPTS check || (echo ==error== ; cat test-suite.log; exit 1)
- name: upload codecov report
if: startsWith(matrix.os, 'ubuntu')
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
pushd src
gcov-9 *.o *.cpp rar/*.cpp rar/*.hpp
bash <(curl -s https://codecov.io/bash)
popd
- name: distcheck
run: |
source $HOME/.bashrc
bash bootstrap.sh
./configure -q
make distcheck
- name: Upload installer as artifact
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: bulk_extractor-${{ steps.ctx.outputs.version }}.tar.gz
path: bulk_extractor-${{ steps.ctx.outputs.version }}.tar.gz
- uses: ammaraskar/[email protected]
name: GCC Problem Matcher