From d813429d891fa4f7347ec50d3c99781e47fc2ac2 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Fri, 10 Feb 2023 18:41:23 +0500 Subject: [PATCH] Add ubuntu mirrors Signed-off-by: Vladislav Shchapov --- .github/workflows/cifuzz.yml | 8 ++++++++ .github/workflows/doc.yml | 8 ++++++++ .github/workflows/linux.yml | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 5967c1f301707..31e99b90454eb 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -4,6 +4,14 @@ jobs: Fuzzing: runs-on: ubuntu-latest steps: + - name: Add ubuntu mirrors + run: | + # Github Actions caching proxy is at times unreliable + # see https://github.com/actions/runner-images/issues/7048 + printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt + curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt + sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list + sudo apt update - name: Build Fuzzers id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index f18320e6622a7..b7737ea7bf846 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -13,6 +13,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Add ubuntu mirrors + run: | + # Github Actions caching proxy is at times unreliable + # see https://github.com/actions/runner-images/issues/7048 + printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt + curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt + sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list + - name: Create Build Environment run: | sudo apt update diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d0acb14bb635..9b75b789ac858 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -72,8 +72,17 @@ jobs: # sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates universe' if: ${{ matrix.cxx == 'g++-4.8' }} + - name: Add ubuntu mirrors + run: | + # Github Actions caching proxy is at times unreliable + # see https://github.com/actions/runner-images/issues/7048 + printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt + curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt + sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list + - name: Create Build Environment run: | + sudo apt update ${{matrix.install}} sudo apt install locales-all cmake -E make_directory ${{runner.workspace}}/build