Skip to content

Update dependency community.general to v13 #533

Update dependency community.general to v13

Update dependency community.general to v13 #533

Workflow file for this run

name: macOS installer CI
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- .github/workflows/macos_ci.yml
- .github/scripts/**
- ansible.cfg
- installer.sh
- setup.sh
- utils/**
- ansible/**
- tests/bats/**
- tui/**
push:
paths:
- .github/workflows/macos_ci.yml
- .github/scripts/**
- ansible.cfg
- installer.sh
- setup.sh
- utils/**
- ansible/**
- tests/bats/**
- tui/**
workflow_dispatch:
jobs:
macos-lint-and-bats:
strategy:
fail-fast: false
matrix:
runner:
- macos-15-intel
- macos-14
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Restore Python/uv/Ansible caches
uses: actions/cache@v5.0.5
with:
path: |
~/Library/Caches/pip
~/.cache/uv
.ansible/collections
~/.ansible/collections
key: ${{ runner.os }}-${{ runner.arch }}-ansible-lint-${{ hashFiles('ansible/requirements.yml', '.github/scripts/install_ansible_requirements.sh') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ansible-lint-
- name: Install macOS requirements
run: |
brew install bash bats-core jq expect newt
- name: Install BATS helper libraries
run: ./.github/scripts/install_bats_helpers.sh
- name: Install ansible-lint dependencies
run: ./.github/scripts/install_ansible_requirements.sh
- name: Run ansible-lint (production profile)
run: ansible-lint --profile production
- name: Run BATS test suite
run: bats tests/bats --verbose-run --print-output-on-failure
macos-scenario-matrix:
strategy:
fail-fast: false
max-parallel: 4
matrix:
include:
- runner: macos-15-intel
channel: testing
profile: ovos
feature_set: minimal
- runner: macos-15-intel
channel: testing
profile: ovos
feature_set: all
- runner: macos-15-intel
channel: alpha
profile: server
feature_set: minimal
- runner: macos-14
channel: testing
profile: ovos
feature_set: minimal
- runner: macos-14
channel: testing
profile: ovos
feature_set: all
- runner: macos-14
channel: alpha
profile: server
feature_set: minimal
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
env:
CI_HOMEASSISTANT_URL: http://homeassistant.local:8123
CI_HOMEASSISTANT_API_KEY: ci-token
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install macOS installer requirements
run: |
brew install bash jq expect newt
- name: Restore installer caches
uses: actions/cache@v5.0.5
with:
path: |
~/Library/Caches/pip
~/.cache/uv
.ansible/collections
~/.ansible/collections
~/.ovos-installer/uv-cache
key: ${{ runner.os }}-${{ runner.arch }}-installer-${{ hashFiles('setup.sh', 'utils/**', 'ansible/**', '.github/scripts/install_ansible_requirements.sh') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-installer-
- name: Resolve bash runtime
run: |
if [ -x /opt/homebrew/bin/bash ]; then
echo "BASH_BIN=/opt/homebrew/bin/bash" >> "$GITHUB_ENV"
elif [ -x /usr/local/bin/bash ]; then
echo "BASH_BIN=/usr/local/bin/bash" >> "$GITHUB_ENV"
else
echo "BASH_BIN=$(command -v bash)" >> "$GITHUB_ENV"
fi
- name: Create non-interactive scenario
shell: bash
run: |
if [ "${{ matrix.feature_set }}" = "all" ] && [ "${{ matrix.profile }}" = "ovos" ]; then
skills=true
extra_skills=true
homeassistant=true
else
skills=false
extra_skills=false
homeassistant=false
fi
mkdir -p "$HOME/.config/ovos-installer"
cat > "$HOME/.config/ovos-installer/scenario.yaml" <<EOF
---
uninstall: false
method: virtualenv
channel: ${{ matrix.channel }}
profile: ${{ matrix.profile }}
features:
skills: ${skills}
extra_skills: ${extra_skills}
homeassistant: ${homeassistant}
raspberry_pi_tuning: false
share_telemetry: false
share_usage_telemetry: false
EOF
- name: Seed root-owned uv cache paths (permission regression canary)
run: |
sudo mkdir -p "$HOME/.cache/uv" "$HOME/.ovos-installer/uv-cache"
sudo chown root:wheel "$HOME/.cache/uv" "$HOME/.ovos-installer/uv-cache"
sudo chmod 0755 "$HOME/.cache" "$HOME/.ovos-installer"
sudo chmod 0700 "$HOME/.cache/uv" "$HOME/.ovos-installer/uv-cache"
- name: Run installer scenario smoke test
shell: bash
env:
OVOS_CI_MAX_INSTALL_SECONDS: "3000"
run: |
start_ts="$(date +%s)"
if [ "${{ matrix.feature_set }}" = "all" ] && [ "${{ matrix.profile }}" = "ovos" ]; then
sudo -E env \
HOMEASSISTANT_URL="${CI_HOMEASSISTANT_URL}" \
HOMEASSISTANT_API_KEY="${CI_HOMEASSISTANT_API_KEY}" \
ANSIBLE_CALLBACKS_ENABLED="profile_tasks,timer" \
REUSE_CACHED_ARTIFACTS=true \
"$BASH_BIN" setup.sh
else
sudo -E env \
ANSIBLE_CALLBACKS_ENABLED="profile_tasks,timer" \
REUSE_CACHED_ARTIFACTS=true \
"$BASH_BIN" setup.sh
fi
elapsed="$(( $(date +%s) - start_ts ))"
echo "Installer elapsed seconds: ${elapsed}"
if [ "$elapsed" -gt "${OVOS_CI_MAX_INSTALL_SECONDS}" ]; then
echo "Installer runtime ${elapsed}s exceeded threshold ${OVOS_CI_MAX_INSTALL_SECONDS}s"
exit 1
fi
- name: Validate uv ownership for installer user
run: |
test "$(stat -f '%Su' "$HOME/.ovos-installer/uv-cache")" = "$USER"
if [ -d "$HOME/.local/share/uv" ]; then
test "$(stat -f '%Su' "$HOME/.local/share/uv")" = "$USER"
fi
if find "$HOME/.ovos-installer/uv-cache" -mindepth 1 -not -user "$USER" | head -n 1 | grep -q .; then
echo "Found non-${USER} files in $HOME/.ovos-installer/uv-cache"
exit 1
fi
if [ -d "$HOME/.local/share/uv" ] && find "$HOME/.local/share/uv" -mindepth 1 -not -user "$USER" | head -n 1 | grep -q .; then
echo "Found non-${USER} files in $HOME/.local/share/uv"
exit 1
fi
- name: Validate launchd smoke services
run: |
VENV_PATH="$HOME/.venvs/ovos"
if [ "$(uname -m)" = "arm64" ]; then
BUS_BIN="$HOME/.local/bin/ovos_messagebus-aarch64-apple-darwin"
else
BUS_BIN="$HOME/.local/bin/ovos_messagebus-x86_64-apple-darwin"
fi
test -x "$VENV_PATH/bin/ovos-core"
test -x "$BUS_BIN"
test -f "$HOME/Library/LaunchAgents/com.ovos.service.plist"
test -f "$HOME/Library/LaunchAgents/com.openvoiceos.ovos-messagebus.plist"
launchctl print "gui/$(id -u)/com.ovos.service" >/dev/null
launchctl print "gui/$(id -u)/com.openvoiceos.ovos-messagebus" >/dev/null
if launchctl print "gui/$(id -u)/com.openvoiceos.ovos-core" >/dev/null 2>&1; then
echo "Legacy launchd label com.openvoiceos.ovos-core should not be loaded."
exit 1
fi
- name: Create uninstall scenario
shell: bash
run: |
mkdir -p "$HOME/.config/ovos-installer"
cat > "$HOME/.config/ovos-installer/scenario.yaml" <<EOF
---
uninstall: true
method: virtualenv
channel: ${{ matrix.channel }}
profile: ${{ matrix.profile }}
features:
skills: false
extra_skills: false
homeassistant: false
raspberry_pi_tuning: false
share_telemetry: false
share_usage_telemetry: false
EOF
- name: Run uninstall smoke test
run: sudo -E env REUSE_CACHED_ARTIFACTS=true "$BASH_BIN" setup.sh
- name: Dump launchd diagnostics on failure
if: failure()
run: |
launchctl list | grep -E 'ovos|hivemind' || true
ls -la "$HOME/Library/LaunchAgents" || true
ls -la "$HOME/.local/state/mycroft/logs" || true