ci: fix the Windows and Linux x86 builds

Every Windows job and Linux x86 were failing; reproduced each locally (MSVC 18
x64/x86, gcc -m32) and fixed:

- studio.cpp: thumbnail buffers were named `small`, which Windows' rpcndr.h
  #defines to `char`, so MSVC saw `std::vector<u8> char(...)`. Renamed to
  `scaled`. (All three Windows builds.)
- 32-bit x86: astcenc's SSE4.1 code calls __builtin_popcountll on 32-bit
  MSVC, which doesn't exist; 32-bit builds now use astcenc's plain backend.
- opus defaulted to the DLL C runtime while the app links the static one;
  x86 MSVC can't link that mix (__except_handler4_common). OPUS_STATIC_RUNTIME.
- 32-bit gcc/clang: turn on SSE2 (-msse2 -mfpmath=sse) as MSVC does; rtm
  (under ACL) uses SSE intrinsics on any x86.
- CI Linux x86: install the i386 X11 dev packages; GLFW couldn't find a
  32-bit libX11 to link.

The x86 and x64 Windows builds pass the same --selftest checks (97/104; the
7 failures are pre-existing and identical on both).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ToastconcernandClaude Opus 5.5 committed 2026-10-22 10:56:57 -05:00
1 parent dc9cfd9838
commit 9b28f864d3
3 files changed
+22 -11

No files matched your search

+4 -1
View File
@@ -22,7 +22,8 @@ jobs:
matrix:
include:
- { arch: x64, runner: ubuntu-24.04, extra: "" }
- { arch: x86, runner: ubuntu-24.04, extra: "gcc-multilib g++-multilib" }
- { arch: x86, runner: ubuntu-24.04, i386: true,
extra: "gcc-multilib g++-multilib libx11-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcursor-dev:i386 libxi-dev:i386" }
- { arch: arm64, runner: ubuntu-24.04-arm, extra: "" }
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
@@ -30,6 +31,8 @@ jobs:
- uses: actions/checkout@v4
- name: Tools and X11 headers
run: |
# x86 links against 32-bit X11, so apt needs the i386 packages too
if [ "${{ matrix.i386 }}" = "true" ]; then sudo dpkg --add-architecture i386; fi
sudo apt-get update
sudo apt-get install -y ninja-build cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxkbcommon-dev ${{ matrix.extra }}
- name: Build