applib/recognizer: drive the dead-zone fallback and make it geometric #4928
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: Build PRF | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| changes-prf: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| should-build: ${{ github.event_name == 'push' || steps.filter.outputs.src == 'true' }} | |
| steps: | |
| - uses: dorny/paths-filter@v4 | |
| if: github.event_name == 'pull_request' | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - '.github/actions/**' | |
| - '.github/workflows/build-prf.yml' | |
| - 'boards/**' | |
| - 'platform/**' | |
| - 'resources/**' | |
| - 'src/**' | |
| - 'tools/**' | |
| - 'third_party/**' | |
| - 'tools/waf/**' | |
| - 'waf' | |
| - 'wscript' | |
| build-prf: | |
| needs: changes-prf | |
| if: needs.changes-prf.outputs.should-build == 'true' | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ghcr.io/coredevices/pebbleos-docker:v6 | |
| strategy: | |
| matrix: | |
| board: | |
| - asterix | |
| - obelix@dvt | |
| - obelix@pvt | |
| - getafix@evt | |
| - getafix@dvt | |
| - getafix@dvt2 | |
| mode: | |
| - normal | |
| - mfg | |
| steps: | |
| - name: Mark Github workspace as safe | |
| run: git config --system --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Rebase onto target branch | |
| uses: ./.github/actions/rebase | |
| with: | |
| submodules: true | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -U pip | |
| pip install -r requirements.txt | |
| - name: Get npm cache directory | |
| id: npm-cache-dir | |
| shell: bash | |
| run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
| - name: Set artifact board name | |
| id: artifact_board | |
| run: echo "NAME=$(printf '%s' "$BOARD" | tr @ _)" >> "$GITHUB_OUTPUT" | |
| env: | |
| BOARD: ${{ matrix.board }} | |
| - name: Configure | |
| run: | | |
| if [ "${{ matrix.mode }}" == "mfg" ]; then | |
| OPTS="-DCONFIG_MFG=y -DCONFIG_LOG_HASHED=n" | |
| fi | |
| ./waf configure --board '${{ matrix.board }}' --variant=prf $OPTS | |
| - name: Build | |
| run: ./waf build | |
| - name: Bundle | |
| run: ./waf bundle | |
| - name: Store | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: prf-${{ steps.artifact_board.outputs.NAME }}-${{ matrix.mode }} | |
| path: | | |
| build/**/*.elf | |
| build/**/*.pbz | |
| build/pebbleos_loghash_dict.json | |
| - name: Get Build ID | |
| id: build_id | |
| run: | | |
| echo "BUILD_ID=$(readelf -n build/pebbleos.elf | sed -n -e 's/^.*Build ID: //p')" >> "$GITHUB_OUTPUT" | |
| - name: Upload log hash dictionary | |
| if: ${{ github.event_name == 'push' && github.repository == 'coredevices/PebbleOS' }} | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.LOG_HASH_BUCKET_SECRET }} | |
| AWS_DEFAULT_REGION: us-east-1 | |
| run: | | |
| pip install awscli | |
| aws s3 cp build/pebbleos_loghash_dict.json \ | |
| "s3://${{ vars.LOG_HASH_BUCKET_NAME }}/${{ steps.build_id.outputs.BUILD_ID }}-${{ github.sha }}-prf.json" \ | |
| --endpoint-url "${{ vars.LOG_HASH_BUCKET_ENDPOINT }}" | |
| build-prf-status: | |
| needs: [changes-prf, build-prf] | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - if: needs.build-prf.result == 'failure' || needs.build-prf.result == 'cancelled' | |
| run: exit 1 |