Skip to content

Commit 8a140c7

Browse files
committed
CI: update ubuntu apt cache before installing new packages
This fixes transient errors on Github CI when apt cache contains outdated information.
1 parent 441eeea commit 8a140c7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ jobs:
2323
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
2424
sudo udevadm control --reload-rules
2525
sudo udevadm trigger --name-match=kvm
26+
- name: Update Ubuntu apt cache
27+
if: matrix.os == 'ubuntu-latest'
28+
run: sudo apt-get update
2629
- name: Install cross compiler
2730
if: matrix.os == 'ubuntu-latest'
28-
run: sudo apt install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
31+
run: sudo apt-get install -y g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
2932
- name: Cached Konan
3033
uses: actions/cache@v4
3134
with:

.github/workflows/snapshot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ jobs:
3131
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
3232
sudo udevadm control --reload-rules
3333
sudo udevadm trigger --name-match=kvm
34+
- name: Update Ubuntu apt cache
35+
if: matrix.os == 'ubuntu-latest'
36+
run: sudo apt-get update
3437
- name: Install cross compiler
3538
if: matrix.os == 'ubuntu-latest'
36-
run: sudo apt install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
39+
run: sudo apt-get install -y g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
3740
- name: Cached Konan
3841
uses: actions/cache@v4
3942
with:

0 commit comments

Comments
 (0)