@@ -117,51 +117,25 @@ jobs:
117117 shell : bash
118118 run : |
119119 set -euo pipefail
120+ sudo apt-get update
120121
121- if [ "${{ matrix.name }}" = "linux-armv7" ]; then
122- # 1) Ensure default Ubuntu sources apply ONLY to amd64 (avoid armhf hitting security.ubuntu.com -> 404)
123- if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then
124- if ! grep -q '^Architectures: .*amd64' /etc/apt/sources.list.d/ubuntu.sources; then
125- sudo sed -i 's/^Types: deb$/Types: deb\nArchitectures: amd64/g' /etc/apt/sources.list.d/ubuntu.sources
126- fi
127- elif [ -f /etc/apt/sources.list ]; then
128- # Older style sources.list: keep it as-is; we'll add a separate armhf list below.
129- true
130- fi
131-
132- # 2) Add an armhf-only "ports" source (this is where armhf packages live)
133- sudo tee /etc/apt/sources.list.d/armhf-ports.sources >/dev/null <<'EOF'
134- Types : deb
135- URIs : http://ports.ubuntu.com/ubuntu-ports
136- Suites : noble noble-updates noble-backports noble-security
137- Components : main universe multiverse restricted
138- Architectures : armhf
139- Signed-By : /usr/share/keyrings/ubuntu-archive-keyring.gpg
140- EOF
141-
142- # 3) Enable armhf arch + update indexes
143- sudo dpkg --add-architecture armhf
122+ if [ "${{ matrix.name }}" = "linux-x86" ]; then
123+ # 32-bit x86 target on x86_64 host
124+ sudo apt-get install -y zip gcc-multilib g++-multilib libc6-dev-i386 pkg-config
125+ sudo dpkg --add-architecture i386
144126 sudo apt-get update
127+ sudo apt-get install -y libsodium-dev:i386
145128
146- # 4) ARMv7 (armhf) cross toolchain + libsodium armhf
129+ elif [ "${{ matrix.name }}" = "linux-armv7" ]; then
147130 sudo apt-get install -y zip pkg-config \
148131 gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
149132 libsodium-dev:armhf
150133
151134 else
152- sudo apt-get update
153-
154- if [ "${{ matrix.name }}" = "linux-x86" ]; then
155- sudo apt-get install -y zip gcc-multilib g++-multilib libc6-dev-i386 pkg-config
156- sudo dpkg --add-architecture i386
157- sudo apt-get update
158- sudo apt-get install -y libsodium-dev:i386
159- else
160- sudo apt-get install -y zip libsodium-dev
161- fi
135+ sudo apt-get install -y zip libsodium-dev
162136 fi
163137
164- # Host tools (fine to be host-arch )
138+ # Host tools (OK to be x86_64 / aarch64 host)
165139 /home/linuxbrew/.linuxbrew/bin/brew install ninja llvm
166140
167141 - name : Install dependencies (Windows)
0 commit comments