Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(ci): workaround Chrome developer sandbox restrictions #16295

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# Dev builds like ToT need this in Ubuntu 23.10+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
CHROME_DEVEL_SANDBOX: ${{ github.workspace }}/.tmp/chrome-tot/chrome_sandbox
FORCE_COLOR: true

# A few steps are duplicated across all jobs. Can be done better when this feature lands:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ jobs:
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/lighthouse/.tmp/chrome-tot/chrome
# Dev builds like ToT need this in Ubuntu 23.10+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
CHROME_DEVEL_SANDBOX: ${{ github.workspace }}/.tmp/chrome-tot/chrome_sandbox
FORCE_COLOR: true
name: DevTools smoke ${{ matrix.smoke-test-shard }}/${{ strategy.job-total }}

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# Dev builds like ToT need this in Ubuntu 23.10+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
CHROME_DEVEL_SANDBOX: ${{ github.workspace }}/.tmp/chrome-tot/chrome_sandbox
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://github.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
Expand Down Expand Up @@ -132,6 +135,9 @@ jobs:
runs-on: ubuntu-latest
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# Dev builds like ToT need this in Ubuntu 23.10+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
CHROME_DEVEL_SANDBOX: ${{ github.workspace }}/.tmp/chrome-tot/chrome_sandbox
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://github.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
name: node ${{ matrix.node }}
env:
CHROME_PATH: ${{ github.workspace }}/.tmp/chrome-tot/chrome
# Dev builds like ToT need this in Ubuntu 23.10+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
CHROME_DEVEL_SANDBOX: ${{ github.workspace }}/.tmp/chrome-tot/chrome_sandbox
LATEST_NODE: '18'
FORCE_COLOR: true

Expand Down
6 changes: 6 additions & 0 deletions core/scripts/download-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@ if [ "$machine" != "MinGw" ]; then
echo "CHROME_PATH version:"
$CHROME_PATH --version
fi

# https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md
if [ "$machine" == "Linux" ] && [[ "${CI:-}" ]]; then
chmod 4755 "$chrome_out/chrome_sandbox"
sudo chown root:root "$chrome_out/chrome_sandbox"
fi
Loading