summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpenguin <penguin@epenguin.net>2025-12-13 22:29:36 -0600
committerpenguin <penguin@epenguin.net>2025-12-14 21:40:50 -0600
commit4c1f1bcb0ebd06bbbf920a9657dcd59f39f6cdde (patch)
tree2f9aae16b38b706a9907ddcbc733c4e2c721fecc
parent3ac866a907a6998896aed4281ff925ae45dac300 (diff)
downloadgentoo-utils-4c1f1bcb0ebd06bbbf920a9657dcd59f39f6cdde.tar.gz
ci: add fuzz job
ci: fuzz: add timeout ci: fuzz: add fuzzer timeout ci: fuzz: fix portage venv
-rw-r--r--.gitea/workflows/gentoo-utils.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/.gitea/workflows/gentoo-utils.yml b/.gitea/workflows/gentoo-utils.yml
index 836c150..0cc5ca2 100644
--- a/.gitea/workflows/gentoo-utils.yml
+++ b/.gitea/workflows/gentoo-utils.yml
@@ -125,6 +125,37 @@ jobs:
meson compile -C build
ninja test -C build
+ fuzz:
+ runs-on: brutalisk
+ env:
+ CC: 'clang'
+ CXX: 'clang++'
+ FUZZER_TIMEOUT_S: 300
+ needs: [build-oci-image, build]
+ container:
+ image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v5
+
+ # FIXME: Get rid of this step when portage has fixes merged?
+ # needed because portage has fixes upstream we need that arent stable yet
+ - name: Checkout tip of portage
+ run: |
+ git clone https://github.com/gentoo/portage.git
+ cd portage
+ python -m venv .venv && ./.venv/bin/pip install -e .
+ source ./.venv/bin/activate
+ which emerge
+
+ - name: build and fuzz
+ run: |
+ source ./portage/.venv/bin/activate
+ which emerge
+ meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
+ meson compile atom_parser_fuzzer:alias -C build
+ timeout 10m ./scripts/fuzz.sh
+
check-format:
runs-on: brutalisk
needs: [build-oci-image]
@@ -164,5 +195,6 @@ jobs:
uses: actions/checkout@v5
- name: grep for patterns
+ # negate git grep ret code because 1 means no findings
run: |
git grep -E 'todo!|dbg!' -- '*.rs' && exit 1 || exit 0