diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/builds.yml | 90 | ||||
-rw-r--r-- | .github/workflows/cifuzz.yml | 26 |
2 files changed, 116 insertions, 0 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 0000000..3ea8e6f --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,90 @@ +name: builds + +on: + - push + - pull_request + +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: + ubuntu-2004: + name: Ubuntu 20.04 + runs-on: ubuntu-latest + container: ubuntu:20.04 + steps: + - uses: actions/checkout@v3.1.0 + - name: Install system dependencies + run: | + apt update + apt-get upgrade -y + apt-get -y install make \ + autoconf \ + build-essential \ + autoconf \ + automake \ + dpkg-dev \ + debhelper \ + libtool \ + make \ + pkg-config \ + zlib1g-dev + - run: ./autogen.sh + - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure + - run: make -j2 + - run: make install + - run: make distcheck + + ubuntu-2204: + name: Ubuntu 22.04 + runs-on: ubuntu-latest + container: ubuntu:22.04 + steps: + - uses: actions/checkout@v3.1.0 + - name: Install system dependencies + run: | + apt update + apt-get upgrade -y + apt-get -y install make \ + autoconf \ + build-essential \ + autoconf \ + automake \ + libtool \ + make \ + pkg-config \ + zlib1g-dev + - run: ./autogen.sh + - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure + - run: make -j2 + - run: make install + - run: make distcheck + + centos-7: + name: CentOS 7 + runs-on: ubuntu-latest + container: centos:7 + steps: + - uses: actions/checkout@v3.1.0 + - name: Install system dependencies + run: | + yum -y install \ + autoconf \ + automake \ + gcc \ + gcc-c++ \ + libtool \ + make \ + pkgconfig \ + which \ + zlib-devel + - run: ./autogen.sh + - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure + - run: make -j2 + - run: make install + - run: make distcheck diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 0000000..36fb6d1 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,26 @@ +name: CIFuzz +on: [pull_request] +jobs: + Fuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'libhtp' + dry-run: false + language: c++ + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'libhtp' + fuzz-seconds: 300 + dry-run: false + language: c++ + - name: Upload Crash + uses: actions/upload-artifact@v3 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts |