Skip to content

TPMS BR initial decoder #2055

TPMS BR initial decoder

TPMS BR initial decoder #2055

Workflow file for this run

name: PR_Build
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pre-commit/[email protected]
gcc:
name: GCC
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- gcc: "9"
steps:
- name: Install
run: |
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
CXXFLAGS: ${{ matrix.cxxflags }}
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
clang:
name: Clang
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- clang: "16"
cxxflags: -fsanitize=leak -fno-sanitize-recover=all
steps:
- name: Install
run: |
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
CC: clang-${{ matrix.clang }}
CXX: clang++-${{ matrix.clang }}
CXXFLAGS: >-
${{ matrix.cxxflags }}
${{ contains(matrix.cxxflags, 'libc++') && '-I/usr/lib/llvm-10/include/c++/v1/' || '' }}
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
xcode:
name: XCode
needs: clang
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- xcode: "16.1"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Select XCode version
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
msvc:
name: Visual Studio
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build examples
env:
PLATFORMIO_BUILD_CACHE_DIR: "../../.pio/buildcache"
run: |
find . -name platformio.ini -type f | sed 's,/platformio.ini$,,' | xargs --verbose -n 1 pio run --jobs 2 --project-dir
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install build tools # Step name updated for clarity
run: |
python3 -m pip install --upgrade pip
pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
- name: Build TheengsDecoder wheel # Step name and command updated
run: |
cd python
cp -r ../src .
python3 setup.py bdist_wheel # Changed sdist to bdist_wheel
cd .. # Added cd back to root
- name: Install TheengsDecoder wheel # New step
run: pip3 install python/dist/*.whl # Installs the built wheel
- name: Test TheengsDecoder import # New step
run: python3 -c "from TheengsDecoder import decodeBLE; print('Successfully imported decodeBLE from PR_build.yml')" # Tests the import
- uses: actions/upload-artifact@v4 # Existing step, will now upload the .whl file(s)
with:
name: python-package
path: python/dist/*