mirror of
https://github.com/adafruit/Adafruit_GPS.git
synced 2026-10-26 22:10:17 +00:00
Add an independent Ubuntu job for all three hardware-independent NMEA tests, with fatal address and undefined-behavior sanitizer checks. Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
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
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
repository: adafruit/ci-arduino
|
|
path: ci
|
|
|
|
- name: pre-install
|
|
run: bash ci/actions_install.sh
|
|
|
|
- name: install SdFat logger example dependency
|
|
run: |
|
|
arduino-cli lib update-index
|
|
arduino-cli lib install "SdFat - Adafruit Fork"
|
|
|
|
- name: test platforms
|
|
run: python3 ci/build_platform.py main_platforms
|
|
|
|
- name: clang
|
|
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
|
|
|
|
- name: doxygen
|
|
env:
|
|
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
|
|
PRETTYNAME : "Adafruit GPS Library"
|
|
run: bash ci/doxy_gen_and_deploy.sh src
|