-
Notifications
You must be signed in to change notification settings - Fork 4
110 lines (109 loc) · 3.76 KB
/
fuzzing.yaml
File metadata and controls
110 lines (109 loc) · 3.76 KB
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
##
## Copyright (c) 2025-2026 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the Bundle Protocol Security Library (BSL).
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## This work was performed for the Jet Propulsion Laboratory, California
## Institute of Technology, sponsored by the United States Government under
## the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1700763.
##
name: Build and run fuzzing
on:
schedule:
- cron: '0 0 * * 0'
push:
branches:
- main
- 'apl-fy[0-9][0-9]'
pull_request: {} # any target
jobs:
fuzzing:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-24.04', 'centos-9']
compiler: ['clang']
name: Fuzzing (${{matrix.os}} ${{matrix.compiler}})
runs-on: ${{ matrix.os == 'centos-9' && 'ubuntu-24.04' || matrix.os }}
container: ${{ matrix.os == 'centos-9' && 'quay.io/centos/centos:stream9' || null }}
permissions:
contents: read
actions: write
env:
CC: ${{matrix.compiler=='clang' && 'clang' || 'gcc'}}
CXX: ${{matrix.compiler=='clang' && 'clang++' || 'g++'}}
steps:
- name: Set up OS
if: startsWith(matrix.os, 'ubuntu')
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
run: |
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build \
ruby pkg-config ccache patch \
${{matrix.compiler=='clang' && 'clang llvm' || 'gcc g++'}} \
libssl-dev libjansson-dev \
xmlstarlet python3-pip
sudo pip3 install gcovr
sudo gem install cbor-diag
- name: Set up OS
if: startsWith(matrix.os, 'centos')
run: |
dnf install -y epel-release
crb enable
dnf install -y \
git rsync \
cmake ninja-build \
ruby pkg-config ccache patch \
${{matrix.compiler=='clang' && 'clang llvm' || 'gcc gcc-c++'}} \
openssl-devel jansson-devel \
xmlstarlet python3-pip
pip3 install gcovr
gem install cbor-diag
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.22
with:
create-symlink: true
- name: Dependencies
run: ./build.sh deps
- name: Prep
run: >
./build.sh prep
-DBUILD_DOCS_API=OFF -DBUILD_DOCS_MAN=OFF
-DBUILD_MOCK_BPA=OFF -DBUILD_UNITTEST=OFF
-DBUILD_FUZZING=ON -DBUILD_COVERAGE=ON
- name: Build
run: ./build.sh
- name: Install
run: ./build.sh install
- name: Test
run: ./build.sh check
- name: Report corpus
run: for FN in $(find test/*cbor*corpus -type f); do echo $FN; cborseq2diag.rb <$FN || true; done
- name: Collect coverage
run: ./build.sh coverage
- name: Archive coverage
uses: actions/upload-artifact@v6
with:
name: ${{github.job}}-${{matrix.os}}-${{matrix.compiler}}-coverage
path: build/default/coverage*
- name: Report coverage
run: ./build.sh coverage-summary >> $GITHUB_STEP_SUMMARY