Skip to content

Improve bounds checks #47

Improve bounds checks

Improve bounds checks #47

Workflow file for this run

name: Build
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'VERSION.txt'
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
java_version: ['8', '11', '17', '21']
env:
JAVA_OPTS: '-XX:+TieredCompilation -XX:TieredStopAtLevel=1'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up JDK
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
cache: 'maven'
- name: Build
run: ./mvnw -B -q -ff -ntp verify
- name: Generate code coverage
if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' }}
run: ./mvnw -B -q -ff -ntp test
- name: Publish code coverage
if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./target/site/jacoco/jacoco.xml
flags: unittests
# TODO: Maybe consider caching Jazzer `.cifuzz-corpus` directory if that improves fuzzing performance?
# But could become outdated when fuzz test methods are changed
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Set up JDK
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Run tests
id: fuzz-tests
# Don't run with `-q`, to see fuzzing progress
run: ./mvnw -B -ff -ntp --activate-profiles fuzz test
- name: Upload fuzz test inputs
if: always() && steps.fuzz-tests.outcome == 'failure'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: fuzz-test-inputs
path: src/test/resources/**/*Inputs/**