Refactor complex telnet function + Add sentry comments #1453
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
static-analysis: | |
runs-on: ubuntu-latest | |
container: egecetinn/alpine | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Run clang-format | |
run: clang-format include/**/*.hpp src/*.cpp src/**/*.cpp --verbose --dry-run --Werror | |
- name: Run cppcheck | |
run: cppcheck -Iinclude/ src --verbose --enable=all --error-exitcode=1 --std=c++17 --language=c++ --suppressions-list=cppcheckSuppressions.txt --inline-suppr --check-level=exhaustive | |
- name: Configure for clang-tidy | |
run: cmake -S . -B build | |
- name: Clang-tidy | |
run: run-clang-tidy -j`nproc` -p=build -header-filter=`pwd`/include/ src/*.cpp src/**/*.cpp | |
memleak: | |
runs-on: ubuntu-latest | |
container: egecetinn/ubuntu2204 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Prepare | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Restore ccache | |
id: ccache-restore | |
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
${{ env.CCACHE_DIR }} | |
key: memleak-ccache-${{ github.run_id }} | |
restore-keys: | | |
memleak-ccache | |
- name: Install Test Requirements | |
run: | | |
python3 -m venv .venv | |
. .venv/bin/activate | |
pip3 install -r tests/data/requirements.txt | |
- name: Configure | |
run: cmake -DXXX_ENABLE_MEMLEAK_CHECK=ON -S . -B build | |
- name: Build | |
run: cmake --build build --parallel | |
- name: Run tests | |
run: | | |
. .venv/bin/activate | |
ctest --output-on-failure --test-dir build | |
- name: Save ccache | |
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
fuzztests: | |
runs-on: ubuntu-latest | |
container: egecetinn/ubuntu2204 | |
strategy: | |
matrix: | |
sanitizer: [ASAN, USAN] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Prepare | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Restore ccache | |
id: ccache-restore | |
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
${{ env.CCACHE_DIR }} | |
key: ${{ matrix.sanitizer }}-ccache-${{ github.run_id }} | |
restore-keys: | | |
${{ matrix.sanitizer }}-ccache | |
- name: Install Test Requirements | |
run: | | |
python3 -m venv .venv | |
. .venv/bin/activate | |
pip3 install -r tests/data/requirements.txt | |
- name: Configure | |
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DXXX_BUILD_UNITTESTS=OFF -DXXX_BUILD_FUZZTESTS=ON -DXXX_ENABLE_${{ matrix.sanitizer }}=ON -S . -B build | |
- name: Build | |
run: cmake --build build --parallel | |
- name: Run tests | |
run: | | |
. .venv/bin/activate | |
ctest --output-on-failure --test-dir build | |
- name: Save ccache | |
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
- name: Upload regressions | |
if: failure() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: regressions-${{ matrix.sanitizer }} | |
path: build/tests/fuzztests/crash* | |
unittests: | |
runs-on: ubuntu-latest | |
container: egecetinn/${{ matrix.image }} | |
strategy: | |
matrix: | |
include: | |
- image: rockylinux8 | |
- image: rockylinux9 | |
- image: ubuntu2204 | |
- image: ubuntu2404 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Prepare | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Restore ccache | |
id: ccache-restore | |
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
${{ env.CCACHE_DIR }} | |
key: ${{ matrix.image }}-ccache-${{ github.run_id }} | |
restore-keys: | | |
${{ matrix.image }}-ccache | |
- name: Install Test Requirements | |
run: | | |
python3 -m venv .venv | |
. .venv/bin/activate | |
pip3 install -r tests/data/requirements.txt | |
- name: Configure | |
run: cmake -S . -B build | |
- name: Build | |
run: cmake --build build --parallel | |
- name: Run Tests | |
run: | | |
. .venv/bin/activate | |
ctest --output-on-failure --test-dir build | |
- name: Save ccache | |
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ steps.ccache-restore.outputs.cache-primary-key }} |