Skip to content

Commit fa9d905

Browse files
authored
Merge pull request #190 from muzarski/fix-ci
ci: add explicit step to update apt cache in jobs
2 parents dc36e73 + 5e72765 commit fa9d905

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/workflows/build-lint-and-test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
29+
- name: Update apt cache
30+
run: sudo apt-get update -y
2831

2932
- name: Install dependencies
3033
run: make install-build-dependencies
@@ -66,6 +69,9 @@ jobs:
6669
with:
6770
python-version: '3.11'
6871

72+
- name: Update apt cache
73+
run: sudo apt-get update -y
74+
6975
- name: Install CCM
7076
run: |
7177
make install-ccm-if-missing
@@ -165,6 +171,9 @@ jobs:
165171
uses: actions/setup-python@v5
166172
with:
167173
python-version: '3.11'
174+
175+
- name: Update apt cache
176+
run: sudo apt-get update -y
168177

169178
- name: Install CCM
170179
run: make install-ccm-if-missing

.github/workflows/pkg.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@ jobs:
6060
- name: Checkout
6161
uses: actions/checkout@v4
6262

63+
- name: Update apt cache
64+
run: sudo apt-get update -y
65+
6366
- name: Build deb package for ${{ matrix.dist-version }}
6467
run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }}

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ clean:
7777

7878
update-apt-cache-if-needed:
7979
@{\
80+
# It searches for a file that is at most one day old.\
81+
# If there is no such file, executes apt update.\
8082
@sudo find /var/cache/apt -type f -mtime -1 2>/dev/null | grep -c "" 2>/dev/null | grep 0 >/dev/null 2>&1 || (\
8183
echo "Apt cache is outdated, update it.";\
8284
sudo apt-get update || true;\

0 commit comments

Comments
 (0)