add bluetooth/detect + after-suspend bluetooth/detect to bluetooth-cert-automated (Bugfix) #874
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: checkbox-dss Snap build | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - contrib/checkbox-dss-validation/checkbox-provider-dss/** | |
| - .github/workflows/checkbox-dss-build.yaml | |
| pull_request_review: | |
| branches: [ main ] | |
| types: [submitted] | |
| workflow_dispatch: | |
| workflow_call: | |
| outputs: | |
| artifact-url: | |
| value: ${{ jobs.snap_frontend_native.outputs.artifact-url }} | |
| jobs: | |
| dss_snap_build_required: | |
| runs-on: ubuntu-latest | |
| name: Check for changes in checkbox-dss dirs | |
| outputs: | |
| build_required: ${{ steps.check_diff.outputs.build_required }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Use git diff to see if there are any changes in the checkbox-dss directories | |
| id: check_diff | |
| run: | | |
| DIFF_LENGTH=`git diff HEAD origin/main -- contrib/checkbox-dss-validation .github/workflows/checkbox-dss-build.yaml | wc -l` | |
| if [[ $DIFF_LENGTH -eq 0 ]] | |
| then | |
| echo "No checkbox-dss snap build required." | |
| echo "build_required=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "checkbox-dss snap build required!" | |
| echo "build_required=true" >> $GITHUB_OUTPUT | |
| fi | |
| snap_frontend_native: | |
| needs: dss_snap_build_required | |
| # When running for a PR, run only after approval | |
| if: github.event_name != 'pull_request_review' || (github.event.review.state == 'approved' && true == fromJSON(needs.dss_snap_build_required.outputs.build_required)) | |
| outputs: | |
| artifact-url: ${{ steps.upload_artifact.outputs.artifact-url }} | |
| runs-on: | |
| group: "Canonical self-hosted runners" | |
| labels: ["self-hosted", "linux", "jammy", "large", "X64"] | |
| timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts | |
| name: Checkbox DSS validation snap | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - id: snap_build | |
| uses: Wandalen/wretry.action@71a909ebf09f3ffdc6f42a17bd54ecb43481da49 | |
| name: Building the snaps | |
| timeout-minutes: 600 # 10hours | |
| with: | |
| action: snapcore/action-build@v1.3.0 | |
| attempt_delay: 600000 # 10min | |
| attempt_limit: 5 | |
| with: | | |
| path: contrib/checkbox-dss-validation/ | |
| snapcraft-channel: 8.x/stable | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f | |
| name: Upload logs on failure | |
| if: failure() | |
| with: | |
| name: snapcraft-log-checkbox-dss-snap | |
| path: | | |
| /home/runner/.cache/snapcraft/log/ | |
| /home/runner/.local/state/snapcraft/log/ | |
| contrib/checkbox-dss-validation/checkbox*.txt | |
| - id: upload_artifact | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f | |
| name: Upload the snaps as artifact | |
| with: | |
| name: checkbox-dss.snap | |
| path: ${{ steps.snap_build.outputs.snap }} | |
| # NOTE:@motjuste: We currently don't publish the checkbox-dss Snap |