Skip to content

Commit 08de158

Browse files
committed
Fully clean apt sources/cache
1 parent 945f5de commit 08de158

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build-linux-cross.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
run: |
1414
sudo dpkg --add-architecture riscv64
1515
16+
# Backup original sources
17+
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
18+
19+
# Completely replace the sources configuration to handle all architectures properly
20+
sudo rm -f /etc/apt/sources.list.d/*.list
21+
1622
# Create a new sources.list with explicit architecture handling
1723
cat << EOF | sudo tee /etc/apt/sources.list
1824
# Standard repositories for amd64 only
@@ -30,7 +36,11 @@ jobs:
3036
deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted universe multiverse
3137
EOF
3238
39+
# Clean and update the apt cache
40+
sudo apt-get clean
41+
sudo rm -rf /var/lib/apt/lists/*
3342
sudo apt-get update
43+
3444
sudo apt-get install -y --no-install-recommends \
3545
build-essential \
3646
gcc-14-riscv64-linux-gnu \

0 commit comments

Comments
 (0)