comparison between tic from device and own method. Fixed the detectio… #29
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Test Package | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
os: [ubuntu-latest] | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python environment | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Step 3: Cache Python dependencies | |
- name: Cache Python Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
# Step 4: Install dependencies | |
- name: Install Build Tools | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install pybind11 | |
# Lint the code | |
- name: Lint Code | |
uses: wearerequired/[email protected] | |
with: | |
linters: | | |
pylint | |
# Step 5: Build the wheel | |
- name: Build Wheel | |
run: python setup.py bdist_wheel | |
# Step 6: Upload built wheels as artifacts | |
- name: Upload Built Wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binaryparser-wheels | |
path: dist/*.whl | |
# Step 7: Release | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# with: | |
# tag_name: v1.0.0 | |
# release_name: "Release v1.0.0" | |
# draft: false | |
# prerelease: false | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Release Asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | |
gh release upload v1.0.0 dist/BinaryParser-0.0.1-cp312-cp312-linux_x86_64.whl | |
# Step 9: Install the built package | |
- name: Install Built Package | |
run: pip install dist/*.whl | |
# Step 10: Run tests | |
- name: Run Tests | |
env: | |
PYTHONPATH: ${{ github.workspace }} | |
run: | | |
pip install pytest | |
pytest tests/ | |
# Optional Step: Debugging (if tests fail) | |
- name: Show Python Environment (Debug) | |
if: failure() | |
run: | | |
python --version | |
pip list | |
ls -R | |