diff --git a/.github/workflows/build-lint-and-test.yml b/.github/workflows/build-lint-and-test.yml index c06fc7bb..615ddbc0 100644 --- a/.github/workflows/build-lint-and-test.yml +++ b/.github/workflows/build-lint-and-test.yml @@ -25,6 +25,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - name: Update apt cache + run: sudo apt-get update -y - name: Install dependencies run: make install-build-dependencies @@ -66,6 +69,9 @@ jobs: with: python-version: '3.11' + - name: Update apt cache + run: sudo apt-get update -y + - name: Install CCM run: | make install-ccm-if-missing @@ -165,6 +171,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.11' + + - name: Update apt cache + run: sudo apt-get update -y - name: Install CCM run: make install-ccm-if-missing diff --git a/.github/workflows/pkg.yml b/.github/workflows/pkg.yml index 97cde88b..b9946199 100644 --- a/.github/workflows/pkg.yml +++ b/.github/workflows/pkg.yml @@ -60,5 +60,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Update apt cache + run: sudo apt-get update -y + - name: Build deb package for ${{ matrix.dist-version }} run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }} diff --git a/Makefile b/Makefile index 7c2d6b34..218fb4c4 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,8 @@ clean: update-apt-cache-if-needed: @{\ + # It searches for a file that is at most one day old.\ + # If there is no such file, executes apt update.\ @sudo find /var/cache/apt -type f -mtime -1 2>/dev/null | grep -c "" 2>/dev/null | grep 0 >/dev/null 2>&1 || (\ echo "Apt cache is outdated, update it.";\ sudo apt-get update || true;\