mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
fix(ci): run apt deadlines inside sudo sessions
This commit is contained in:
@@ -9,7 +9,8 @@ fi
|
||||
bash "$(dirname "${BASH_SOURCE[0]}")/prepare-ubuntu-apt.sh"
|
||||
|
||||
# Eight minutes of command allowances leave room for tests within the job deadline.
|
||||
if timeout 45 sudo apt-get update -o Acquire::Languages=none && timeout 120 sudo apt-get install -y "$@"; then
|
||||
# Run deadlines as root so sudo cannot leave apt in a separate session.
|
||||
if sudo timeout --kill-after=10s 45 apt-get update -o Acquire::Languages=none && sudo timeout --kill-after=10s 120 apt-get install -y "$@"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -21,7 +22,7 @@ done
|
||||
bash "$(dirname "${BASH_SOURCE[0]}")/use-ubuntu-apt-mirror.sh"
|
||||
bash "$(dirname "${BASH_SOURCE[0]}")/recover-ubuntu-dpkg.sh" || true
|
||||
# Unrelated repositories may fail refresh; apt still verifies the requested packages.
|
||||
if ! timeout 120 sudo apt-get update -o Acquire::Languages=none; then
|
||||
if ! sudo timeout --kill-after=10s 120 apt-get update -o Acquire::Languages=none; then
|
||||
echo 'Index refresh incomplete; attempting the requested packages with available authenticated indexes.' >&2
|
||||
fi
|
||||
timeout 150 sudo apt-get install -y "$@"
|
||||
sudo timeout --kill-after=10s 150 apt-get install -y "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
# A timed-out apt frontend can leave dpkg running in a separate session.
|
||||
timeout 30 sudo bash -euo pipefail -c '
|
||||
sudo timeout --kill-after=10s 30 bash -euo pipefail -c '
|
||||
while lslocks --noheadings --raw --notruncate --output PATH | grep -E "^/var/lib/dpkg/lock(-frontend)?$" >/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -932,14 +932,14 @@ jobs:
|
||||
pnpm exec playwright-core install --with-deps webkit
|
||||
exit 0
|
||||
fi
|
||||
echo 'Installing WebKit and its dependencies through the primary route.'
|
||||
if timeout --kill-after=10s 240 pnpm exec playwright-core install --with-deps webkit; then
|
||||
exit 0
|
||||
echo 'Installing WebKit dependencies through the primary route.'
|
||||
if ! sudo env "PATH=$PATH" timeout --kill-after=10s 240 pnpm exec playwright-core install-deps webkit; then
|
||||
echo 'Dependency installation did not complete; retrying with the Ubuntu mirror fallback.'
|
||||
bash .github/scripts/use-ubuntu-apt-mirror.sh
|
||||
bash .github/scripts/recover-ubuntu-dpkg.sh || true
|
||||
sudo env "PATH=$PATH" timeout --kill-after=10s 360 pnpm exec playwright-core install-deps webkit
|
||||
fi
|
||||
echo 'WebKit installation did not complete; retrying with the Ubuntu mirror fallback.'
|
||||
bash .github/scripts/use-ubuntu-apt-mirror.sh
|
||||
bash .github/scripts/recover-ubuntu-dpkg.sh || true
|
||||
timeout --kill-after=10s 360 pnpm exec playwright-core install --with-deps webkit
|
||||
timeout --kill-after=10s 180 pnpm exec playwright-core install webkit
|
||||
|
||||
# The entry lives in mobile/ so one React resolves; without this every RN import is nothing.
|
||||
- uses: ./.github/actions/install-mobile-dependencies
|
||||
|
||||
Reference in New Issue
Block a user