Skip to content

Commit

Permalink
[CI]: Fix broken dependencies cache
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshiotomakan committed Apr 24, 2024
1 parent 5592585 commit 408c917
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions tools/install-sys-dependencies-linux
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 408c917

Please sign in to comment.