diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index a0c0cfa505b..376494010c3 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -15,24 +15,17 @@ jobs: runs-on: ubuntu-latest # if: github.event.pull_request.draft == false steps: - # Work around https://github.com/actions/runner-images/issues/8659 - - name: Remove GCC 13 from runner image - shell: bash - run: | - # Work around https://github.com/actions/runner-images/issues/9733 - sudo rm /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update - uses: actions/checkout@v3 - name: Install system dependencies run: | - tools/install-sys-dependencies-linux + tools/install-sys-dependencies-linux ci tools/install-rust-dependencies - name: Cache internal dependencies id: internal_cache uses: actions/cache@v3 with: path: build/local - key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }} + key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-sys-dependencies-linux') }}-${{ hashFiles('tools/install-dependencies') }} - name: Install internal dependencies run: | tools/install-dependencies diff --git a/tools/install-sys-dependencies-linux b/tools/install-sys-dependencies-linux index b9173e25e42..3527b6faba3 100755 --- a/tools/install-sys-dependencies-linux +++ b/tools/install-sys-dependencies-linux @@ -2,5 +2,23 @@ set -e - # build-essential clang-14 libc++-dev libc++abi-dev ruby-full cmake - sudo apt-get update && sudo apt-get install ninja-build lcov llvm-14 clang-tidy-14 libboost-all-dev rustc --fix-missing +# build-essential clang-14 libc++-dev libc++abi-dev ruby-full cmake +sudo apt-get update && sudo apt-get install ninja-build lcov llvm-14 clang-tidy-14 libboost-all-dev rustc --fix-missing + +# Downgrade libc to temporarily fix https://github.com/actions/runner-images/issues/8659 +if [[ "$1" == "ci" ]]; then + LIBSTD_PACKAGE_VERSION="12.3.0-1ubuntu1~22.04" + # Bump this version if the CI has been broken due to the packages update. + LIBC_PACKAGE_VERSION="2.35-0ubuntu3.7" + + echo "Remove GCC 13 from runner image - runner-images/8659 workaround" + echo "NOTE: Bump $LIBC_PACKAGE_VERSION version if the CI has been broken due to the packages update" + + sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list + sudo apt-get update + sudo apt-get install -y --allow-downgrades \ + libc6=$LIBC_PACKAGE_VERSION \ + libc6-dev=$LIBC_PACKAGE_VERSION \ + libstdc++6=$LIBSTD_PACKAGE_VERSION \ + libgcc-s1=$LIBSTD_PACKAGE_VERSION +fi