diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index 25b79fa..a755ca3 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -3,6 +3,26 @@ name: Arduino Library CI on: [pull_request, push, repository_dispatch] jobs: + nmea-tests: + name: NMEA regression tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Run host tests with sanitizers + shell: bash + run: | + set -euo pipefail + mkdir -p "$RUNNER_TEMP/nmea-tests" + for test in nmea_validate nmea_fields nmea_utilities; do + echo "Running $test" + g++ -std=c++11 -Wall -Wextra -Werror -g \ + -fsanitize=address,undefined -fno-sanitize-recover=all \ + -fno-omit-frame-pointer -Isrc src/Adafruit_NMEA.cpp \ + "extras/tests/$test/$test.cpp" -o "$RUNNER_TEMP/nmea-tests/$test" + "$RUNNER_TEMP/nmea-tests/$test" + done + build: runs-on: ubuntu-latest