Add Schneider Electric Odace SFSP decoder #2146
Workflow file for this run
This file contains hidden or 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: 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/action@v3.0.0 | |
| 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/* | |
| nodejs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Set up Emscripten | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 3.1.61 | |
| actions-cache-folder: emsdk-cache | |
| - name: Build WebAssembly module | |
| working-directory: nodejs/theengs-decoder | |
| run: | | |
| npm install --ignore-scripts | |
| npm run build | |
| - name: Run base package tests | |
| working-directory: nodejs/theengs-decoder | |
| run: npm test | |
| - name: Run Node-RED wrapper tests | |
| working-directory: nodejs/node-red-contrib-theengs-decoder | |
| run: | | |
| # The wrapper's only dependency is the locally-built base package, | |
| # which isn't on npm yet at PR time, so install it directly. | |
| npm install --no-save ../theengs-decoder | |
| npm test | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: nodejs-wasm | |
| path: nodejs/theengs-decoder/dist/* |