From e03753c4ac04d80517ec5fa92e78b0dc1f896a70 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Sun, 12 Feb 2023 20:46:50 +0500 Subject: [PATCH] Add ubuntu mirrors (#3302) Signed-off-by: Vladislav Shchapov --- .github/workflows/doc.yml | 8 ++++++++ .github/workflows/linux.yml | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index f18320e6..b7737ea7 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 4d0acb14..9b75b789 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