Skip to content

Commit 45b9ec3

Browse files
authored
ci: fix error failing atheris-libprotobuf-mutator build (#4818)
* ci: fix error failing atheris-libprotobuf-mutator build * ci: update python version to 3.10
1 parent 66e529e commit 45b9ec3

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/fuzzing.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
schedule:
55
- cron: '0 7 * * 1' # Runs at 07:00 on monday every week
66

7-
workflow_dispatch:
7+
workflow_dispatch:
88

99
permissions:
1010
contents: read
@@ -13,17 +13,34 @@ jobs:
1313
fuzzing:
1414
name: Fuzzing
1515
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
16-
if: github.event.repository.fork == false
16+
if: github.event.repository.fork == false
1717
steps:
18-
- name: Check out code
18+
- name: Check out code
1919
uses: actions/checkout@v4
2020

21-
- name: Set up Python
21+
- name: Set up Python
2222
uses: actions/[email protected]
2323
with:
24-
python-version: 3.9
24+
python-version: 3.10.16
2525

26-
- name: Install Bazel
26+
- name: Install Build Dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y build-essential gcc g++ cmake
30+
31+
- name: Install newer GCC
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y gcc-10 g++-10
35+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
36+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
37+
38+
- name: Set up compiler environment
39+
run: |
40+
export CC=gcc
41+
export CXX=g++
42+
43+
- name: Install Bazel
2744
run: |
2845
sudo apt-get update
2946
sudo apt-get install -y wget
@@ -32,11 +49,12 @@ jobs:
3249
sudo mv bazel-7.4.1-linux-x86_64 /usr/local/bin/bazel
3350
bazel --version
3451
35-
- name: Install Fuzzing Dependencies
52+
- name: Install Fuzzing Dependencies
3653
run: |
3754
pip install --upgrade atheris
38-
pip install --upgrade atheris-libprotobuf-mutator
55+
pip install --upgrade atheris-libprotobuf-mutator -v
3956
pip install --upgrade protobuf
57+
4058
- name: Install Cve-bin-tool
4159
run: |
4260
python -m pip install --upgrade pip
@@ -56,21 +74,22 @@ jobs:
5674
with:
5775
path: fuzz-cache
5876
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}
77+
5978
- name: Get yesterday's cached database if today's is not available
6079
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
6180
if: steps.todays-cache.outputs.cache-hit != 'true'
6281
with:
6382
path: fuzz-cache
6483
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}
65-
84+
6685
- name: Try single CLI run of tool
6786
if: env.sbom != 'true'
6887
run: |
6988
[[ -e fuzz-cache ]] && mkdir -p .cache && mv fuzz-cache ~/.cache/cve-bin-tool
7089
NO_EXIT_CVE_NUM=1 python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out --disable-data-source CURL,EPSS,GAD,NVD,OSV,PURL2CPE,RSD
7190
cp -r ~/.cache/cve-bin-tool fuzz-cache
7291
73-
- name: Run Fuzzing
92+
- name: Run Fuzzing
7493
id: fuzzing
7594
env:
7695
PYTHONPATH: ${{ github.workspace }}

0 commit comments

Comments
 (0)