Skip to content

Commit

Permalink
Grant Bluetooth access on GitHub hosted runners
Browse files Browse the repository at this point in the history
Only where needed, ie for Qt 5.x and 6.2, and only on macOS 14 and 15.

Squashed commit of the following:

commit 86aeaf6
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 20:42:50 2024 +1100

    Re-instate Linux and Windows builds

commit 92151ba
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 19:48:27 2024 +1100

    Correct the `if` logic

commit 947a44c
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 19:36:07 2024 +1100

    Begin cleaning up the TCC code

commit 493eab6
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 19:18:27 2024 +1100

    Try just the 'always' permission

commit e717f04
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 19:14:47 2024 +1100

    Try the runprovisioner.sh

commit 0124a91
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:55:05 2024 +1100

    Try the provishioner

commit bad4b81
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:48:25 2024 +1100

    Try terminal

commit 9289228
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:41:42 2024 +1100

    Begin narrowing down the required permissions

commit 52e02e6
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:25:33 2024 +1100

    Allow for the space

commit 3828176
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:21:51 2024 +1100

    Try the user TCC too

commit df45641
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 18:13:54 2024 +1100

    Try sudo

commit fb0590f
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 17:53:20 2024 +1100

    See what perms are available

commit 470f91f
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 17:43:36 2024 +1100

    Try auth_reason 3

commit f07c97c
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 15:35:30 2024 +1100

    Allow all

commit fe2b27b
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 15:25:50 2024 +1100

    Try some more perms

commit 5aff5bc
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 15:00:33 2024 +1100

    Grant Bluetooth permission to more services

commit 7a9f918
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 14:42:45 2024 +1100

    Need to sudo

commit 11c83b6
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 14:29:23 2024 +1100

    Try granting Bluetooth access

commit a501a2d
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 14:00:45 2024 +1100

    Get a look at the full schema

commit 33e6e33
Author: Paul Colby <git@colby.id.au>
Date:   Sun Oct 13 13:43:39 2024 +1100

    See if SIP allows us to access TCC

commit 8a425f7
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 12 15:37:12 2024 +1100

    Try running tests under `sudo`

    To see if that avoids the '<app> needs Bluetooth' prompt.
  • Loading branch information
pcolby committed Oct 13, 2024
1 parent 934227d commit 832befa
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,6 @@ jobs:
- { qt: '5.14.2', os: macos-15, cc: gcc }
- { qt: '5.15.2', os: macos-14, cc: gcc }
- { qt: '5.15.2', os: macos-15, cc: gcc }
# Exclude Qt 5.x and 6.2 with Clang on macOS 14+, since these have unit tests that hang on GitHub's runners.
- { qt: '5.9.9', os: macos-14, cc: clang } # \todo Explore these hangs on a local macOS host,
- { qt: '5.9.9', os: macos-15, cc: clang } # \todo because they might not be specific to GitHub.
- { qt: '5.10.1', os: macos-14, cc: clang }
- { qt: '5.10.1', os: macos-15, cc: clang }
- { qt: '5.11.3', os: macos-14, cc: clang }
- { qt: '5.11.3', os: macos-15, cc: clang }
- { qt: '5.12.12', os: macos-14, cc: clang }
- { qt: '5.12.12', os: macos-15, cc: clang }
- { qt: '5.13.2', os: macos-14, cc: clang }
- { qt: '5.13.2', os: macos-15, cc: clang }
- { qt: '5.14.2', os: macos-14, cc: clang }
- { qt: '5.14.2', os: macos-15, cc: clang }
- { qt: '5.15.2', os: macos-14, cc: clang }
- { qt: '5.15.2', os: macos-15, cc: clang }
- { qt: '6.2.4', os: macos-14, cc: clang }
- { qt: '6.2.4', os: macos-15, cc: clang }
# Exclude Qt 5.10 with GCC on macOS. See https://bugreports.qt.io/browse/QTBUG-66585
- { qt: '5.10.1', cc: gcc }
# Exclude Qt 6.x with GCC on macOS for now. See https://bugreports.qt.io/browse/QTBUG-107050
Expand Down Expand Up @@ -284,6 +267,12 @@ jobs:
"$RUNNER_TEMP/release/src/cli/dokit.app/Contents/MacOS/dokit" --version
[[ '${{ matrix.os }}' == 'macos-13' && '${{ matrix.cc }}' == 'clang' ]] ||
"$RUNNER_TEMP/coverage/src/cli/dokit.app/Contents/MacOS/dokit" --version
- name: Grant Bluetooth access # Only needed for unit tests with older Qt's on newer runners.
if: matrix.os != 'macos-13' && ( startsWith(matrix.qt, '5') || startsWith(matrix.qt, '6.2.') )
run: >
sudo sqlite3 "$HOME/Library/Application Support/com.apple.TCC/TCC.db" "INSERT or REPLACE INTO access
( service, client, client_type, auth_value, auth_reason, auth_version, flags ) VALUES
( 'kTCCServiceBluetoothAlways', '/usr/local/opt/runner/provisioner/provisioner', 1, 2, 3, 1, 0 )"
- name: Test
run: |
[[ '${{ matrix.os }}' == 'macos-13' && '${{ matrix.cc }}' == 'clang' ]] ||
Expand Down

0 comments on commit 832befa

Please sign in to comment.