Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 0 additions & 258 deletions .github/workflows/ci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Release packages
pull_request:
paths:
- '.github/workflows/release-packages.yml'
- '.github/workflows/ci.yml'
- '.github/workflows/sanitizers.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'src/**'
Expand All @@ -26,7 +26,7 @@ name: Release packages
expected_version:
description: 'Hand SDK version (transport may use a compatible newer patch)'
required: true
default: '0.3.11'
default: '0.3.12'

permissions:
contents: read
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Sanitizers

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
COMM_REPOSITORY: ${{ vars.LINKERBOT_COMM_REPOSITORY || format('{0}/linkerbot-transport-cpp', github.repository_owner) }}
# Transport v0.3.4 release commit; keep checkout instructions in sync.
COMM_REF: 0e190032d65ed0b315337b45b3779cf4f650ed68

jobs:
validation:
name: Validation
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out hand SDK
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: hand-cpp

- name: Check documentation and analysis helpers
working-directory: hand-cpp
run: |
python3 validation/check_docs.py
python3 -m unittest discover -s validation -p 'test_quality_tools.py'
python3 -m unittest discover -s validation -p 'test_transport_provider.py'
python3 -m unittest discover -s validation -p 'test_release*.py'

- name: Check out communication library
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ env.COMM_REPOSITORY }}
ref: ${{ env.COMM_REF }}
path: linkerbot-transport-cpp
token: ${{ secrets.LINKERBOT_COMM_TOKEN || github.token }}

- name: Install boundary check compiler
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends g++-13

- name: Check protocol boundaries
working-directory: hand-cpp
run: |
python3 validation/check_protocol_boundary.py \
--source . \
--comm-include "${GITHUB_WORKSPACE}/linkerbot-transport-cpp/include" \
--compiler g++-13
python3 validation/l6/check_boundary.py \
--comm-include "${GITHUB_WORKSPACE}/linkerbot-transport-cpp/include" \
--compiler g++-13

sanitizers:
name: ASan and UBSan
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
CC: gcc-13
CXX: g++-13
ASAN_OPTIONS: detect_leaks=0:halt_on_error=1:strict_string_checks=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1

steps:
- name: Set offline configuration directory
run: echo "XDG_CONFIG_HOME=${RUNNER_TEMP}/xdg-config" >> "$GITHUB_ENV"

- name: Check out hand SDK
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: hand-cpp

- name: Check out communication library
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ env.COMM_REPOSITORY }}
ref: ${{ env.COMM_REF }}
path: linkerbot-transport-cpp
token: ${{ secrets.LINKERBOT_COMM_TOKEN || github.token }}

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cmake ninja-build gcc-13 g++-13

- name: Configure sanitizer build
working-directory: hand-cpp
run: |
cmake -S . -B build-sanitized -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined" \
-DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,undefined" \
-DLINKERBOT_COMM_SOURCE_DIR="${GITHUB_WORKSPACE}/linkerbot-transport-cpp" \
-DLINKERBOT_BUILD_EXAMPLES=OFF \
-DLINKERBOT_BUILD_TESTS=ON \
-DLINKERBOT_BUILD_TOOLS=ON \
-DLINKERBOT_COMM_BUILD_TESTS=OFF

- name: Build sanitizer test targets
working-directory: hand-cpp
run: |
cmake --build build-sanitized --parallel 4 --target \
tests protocol-tests l6_read_version l6_frequency_benchmark

- name: Run sanitizer tests
working-directory: hand-cpp
run: ctest --test-dir build-sanitized --output-on-failure --timeout 180
Loading