mirror of
https://github.com/servo/servo.git
synced 2025-09-16 09:58:23 +01:00
CI: Change APT mirror priorities (#39190)
We noticed many times that bootstrap sometimes takes a lot of time due to slow download speed: [#general > Bootstrap is slow in CI @ 💬](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Bootstrap.20is.20slow.20in.20CI/near/537610373). We [reported this to github](https://github.com/actions/runner-images/issues/12949) and they said we should just use different mirrors. Based on https://github.com/CrowdStrike/glide-core/pull/1113 we change Ubuntu's mirror priorities from: ``` http://azure.archive.ubuntu.com/ubuntu priority:0 https://archive.ubuntu.com/ubuntu priority:1 https://security.ubuntu.com/ubuntu priority:2 ``` to: ``` https://archive.ubuntu.com/ubuntu priority:0 http://azure.archive.ubuntu.com/ubuntu priority:1 https://security.ubuntu.com/ubuntu priority:2 ``` I also set more strict timeout (10 min; usually it takes 2-3 min but always less then 4 min) for bootstrap to alert us on problems. Testing: Manual CI run: https://github.com/sagudev/servo/actions/runs/17527791255 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
a672ffb850
commit
286bbe6cb1
3 changed files with 20 additions and 1 deletions
13
.github/actions/apt-mirrors/action.yml
vendored
Normal file
13
.github/actions/apt-mirrors/action.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Based on https://github.com/CrowdStrike/glide-core/pull/1113
|
||||||
|
name: Change Mirror Priorities
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
# https://github.com/actions/runner-images/issues/7048
|
||||||
|
- name: Change Mirror Priorities
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo sed -i '/archive.ubuntu.com\/ubuntu\/\tpriority/ s/priority:2/priority:0/' /etc/apt/apt-mirrors.txt
|
||||||
|
sudo sed -i '/azure.archive.ubuntu.com\/ubuntu\/\tpriority/ s/priority:0/priority:1/' /etc/apt/apt-mirrors.txt
|
||||||
|
sudo sed -i '/security.ubuntu.com\/ubuntu\/\tpriority/ s/priority:3/priority:2/' /etc/apt/apt-mirrors.txt
|
||||||
|
sudo cat /etc/apt/apt-mirrors.txt
|
4
.github/workflows/linux-wpt.yml
vendored
4
.github/workflows/linux-wpt.yml
vendored
|
@ -64,8 +64,10 @@ jobs:
|
||||||
run: tar -xzf ${{ inputs.profile }}-binary-linux/target.tar.gz
|
run: tar -xzf ${{ inputs.profile }}-binary-linux/target.tar.gz
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: ./.github/actions/setup-python
|
uses: ./.github/actions/setup-python
|
||||||
|
- name: Change Mirror Priorities
|
||||||
|
uses: ./.github/actions/apt-mirrors
|
||||||
- name: Bootstrap dependencies
|
- name: Bootstrap dependencies
|
||||||
timeout-minutes: 60
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers fonts-noto-cjk
|
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers fonts-noto-cjk
|
||||||
|
|
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
|
@ -163,8 +163,12 @@ jobs:
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
if: ${{ runner.environment != 'self-hosted' }}
|
if: ${{ runner.environment != 'self-hosted' }}
|
||||||
uses: ./.github/actions/setup-python
|
uses: ./.github/actions/setup-python
|
||||||
|
- name: Change Mirror Priorities
|
||||||
|
if: ${{ runner.environment != 'self-hosted' }}
|
||||||
|
uses: ./.github/actions/apt-mirrors
|
||||||
- name: Bootstrap dependencies
|
- name: Bootstrap dependencies
|
||||||
if: ${{ runner.environment != 'self-hosted' }}
|
if: ${{ runner.environment != 'self-hosted' }}
|
||||||
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
./mach bootstrap --skip-lints
|
./mach bootstrap --skip-lints
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue