Skip to content

Commit 9eba627

Browse files
hajimehoshiclaude
andcommitted
.github/workflows: use a Bootlin GCC for linux/mips (#556)
ubuntu-latest now runs Ubuntu 26.04, which no longer provides gcc-mips-linux-gnu. Installing it failed, and fail-fast then cancelled the rest of the test matrix. Debian is dropping its mips cross-compilers as well. Download a prebuilt mips32 glibc GCC toolchain from Bootlin, verify its SHA-256, and use it as CC for the linux/mips Cgo build. This no longer depends on any distribution's packages. The toolchain runs only on x86_64 hosts, so the build now runs on ubuntu-latest only instead of also on ubuntu-24.04-arm. Closes #560 Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 0fd9f62 commit 9eba627

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ jobs:
8585
8686
- name: go build (Linux mips, Cgo)
8787
# mips builds only via the Cgo fallback (CGO_ENABLED=1). See #460.
88-
if: runner.os == 'Linux'
88+
# Ubuntu 26.04 no longer provides gcc-mips-linux-gnu, so use a prebuilt GCC
89+
# toolchain from Bootlin. The toolchain runs only on x86_64 hosts.
90+
if: runner.os == 'Linux' && runner.arch == 'X64'
8991
run: |
90-
sudo apt-get update
91-
sudo apt-get install -y gcc-mips-linux-gnu
92-
env GOOS=linux GOARCH=mips CGO_ENABLED=1 CC=mips-linux-gnu-gcc go build -v ./...
92+
toolchain=mips32--glibc--stable-2026.08-1
93+
wget -q "https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/${toolchain}.tar.xz" -O /tmp/${toolchain}.tar.xz
94+
echo "f3d2ca00826b5cf159a0486edf8179bbe3df10eb275acf332c6c0614ff8b8500 /tmp/${toolchain}.tar.xz" | sha256sum -c -
95+
tar -C /tmp -xJf /tmp/${toolchain}.tar.xz
96+
env GOOS=linux GOARCH=mips CGO_ENABLED=1 CC=/tmp/${toolchain}/bin/mips-buildroot-linux-gnu-gcc go build -v ./...
9397
9498
- name: go build (plugin)
9599
if: runner.os == 'Linux' || runner.os == 'macOS'

0 commit comments

Comments
 (0)