detached d685103

.github/workflows: reduce CI time for minor architectures (#417)

As the number of supported architectures has been increasing, CI
time is the maintainers' concern.

Test the minor archtectures (loong64, ppc64le, and riscv64) only
with the latest Go in order to reduce CI time.
commit
d685103625c14fdd0b62bcca1e6c159841954c7b
author
Hajime Hoshi · · 2026-02-15 13:52 UTC
committer
GitHub · · 2026-02-15 13:52 UTC
parent
d8dcb88
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
1 file · +44 -40
M .github/workflows/test.yml +44 -40
@@ -70,12 +70,14 @@ jobs:
7070 env GOOS=netbsd GOARCH=amd64 go build -v ./...
7171 env GOOS=netbsd GOARCH=arm64 go build -v ./...
7272
73- - name: go build (Linux loong64)
74- if: ${{ !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') && !startsWith(matrix.go, '1.22.') && !startsWith(matrix.go, '1.23.') && !startsWith(matrix.go, '1.24.') }}
73+ - name: go build (Linux minor architectures)
74+ # Test them only on the latest Go to reduce CI time.
75+ if: startsWith(matrix.go, '1.26.')
7576 run: |
76- # Check cross-compiling Linux binaries for loong64.
77- # Loong64 support internal linking from go1.25.
77+ # Check cross-compiling Linux binaries for minor architectures.
7878 env GOOS=linux GOARCH=loong64 go build -v ./...
79+ env GOOS=linux GOARCH=ppc64le go build -v ./...
80+ env GOOS=linux GOARCH=riscv64 go build -v ./...
7981
8082 - name: go build (plugin)
8183 if: runner.os == 'Linux' || runner.os == 'macOS'
@@ -140,36 +142,6 @@ jobs:
140142 go env -u CC
141143 go env -u CXX
142144
143- - name: go test (Linux ppc64le)
144- if: ${{ runner.os == 'Linux' && runner.arch != 'ARM64' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') }}
145- run: |
146- sudo apt-get update
147- sudo apt-get install -y gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu qemu-user
148- go env -w CC=powerpc64le-linux-gnu-gcc
149- go env -w CXX=powerpc64le-linux-gnu-g++
150- env GOOS=linux GOARCH=ppc64le CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
151- env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
152- env GOOS=linux GOARCH=ppc64le CGO_ENABLED=1 go test -c -o=purego-test-cgo .
153- env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
154- go env -u CC
155- go env -u CXX
156-
157- - name: go test (Linux riscv64)
158- if: ${{ runner.os == 'Linux' && runner.arch != 'ARM64' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') }}
159- run: |
160- sudo apt-get update
161- sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user
162- go env -w CC=riscv64-linux-gnu-gcc
163- go env -w CXX=riscv64-linux-gnu-g++
164- # Create symlink for the dynamic linker that QEMU expects
165- sudo ln -sf /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld.so.1
166- env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
167- env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
168- env GOOS=linux GOARCH=riscv64 CGO_ENABLED=1 go test -c -o=purego-test-cgo .
169- env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
170- go env -u CC
171- go env -u CXX
172-
173145 - name: go test race (no Cgo)
174146 if: ${{ runner.os == 'macOS' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') }}
175147 run: |
@@ -181,26 +153,34 @@ jobs:
181153 run: |
182154 env CGO_ENABLED=1 go test -race -shuffle=on -v -count=10 ./...
183155
184- loong:
156+ minor-arches:
185157 strategy:
186158 matrix:
187- # Loong64 support internal linking from go1.25.
188- go: ['1.25.x', '1.26.x']
189- name: Test with Go ${{ matrix.go }} on Linux loong64
159+ # Test them only on the latest Go to reduce CI time.
160+ go: ['1.26.x']
161+ name: Test with Go ${{ matrix.go }} on Linux minor architectures
190162 runs-on: ubuntu-latest
191163 defaults:
192164 run:
193165 shell: bash
194166 steps:
195- - uses: actions/checkout@v5
167+ - name: Checkout
168+ uses: actions/checkout@v5
169+
196170 - name: Setup Go
197171 uses: actions/setup-go@v6
198172 with:
199173 go-version: ${{ matrix.go }}
174+
200175 - name: Set up the prerequisites
201176 run: |
202177 sudo apt-get update
203- sudo apt-get install -y gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu qemu-user
178+ sudo apt-get install -y \
179+ gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu \
180+ gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu \
181+ gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \
182+ qemu-user
183+
204184 - name: go test (Linux loong64)
205185 run: |
206186 go env -w CC=loongarch64-linux-gnu-gcc-14
@@ -212,6 +192,30 @@ jobs:
212192 go env -u CC
213193 go env -u CXX
214194
195+ - name: go test (Linux ppc64le)
196+ run: |
197+ go env -w CC=powerpc64le-linux-gnu-gcc
198+ go env -w CXX=powerpc64le-linux-gnu-g++
199+ env GOOS=linux GOARCH=ppc64le CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
200+ env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
201+ env GOOS=linux GOARCH=ppc64le CGO_ENABLED=1 go test -c -o=purego-test-cgo .
202+ env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
203+ go env -u CC
204+ go env -u CXX
205+
206+ - name: go test (Linux riscv64)
207+ run: |
208+ go env -w CC=riscv64-linux-gnu-gcc
209+ go env -w CXX=riscv64-linux-gnu-g++
210+ # Create symlink for the dynamic linker that QEMU expects
211+ sudo ln -sf /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld.so.1
212+ env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
213+ env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
214+ env GOOS=linux GOARCH=riscv64 CGO_ENABLED=1 go test -c -o=purego-test-cgo .
215+ env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
216+ go env -u CC
217+ go env -u CXX
218+
215219 bsd:
216220 strategy:
217221 matrix:
@@ -70,12 +70,14 @@ jobs:
70 env GOOS=netbsd GOARCH=amd64 go build -v ./...70 env GOOS=netbsd GOARCH=amd64 go build -v ./...
71 env GOOS=netbsd GOARCH=arm64 go build -v ./...71 env GOOS=netbsd GOARCH=arm64 go build -v ./...
72 72
73- - name: go build (Linux loong64)73+ - name: go build (Linux minor architectures)
74- if: ${{ !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') && !startsWith(matrix.go, '1.22.') && !startsWith(matrix.go, '1.23.') && !startsWith(matrix.go, '1.24.') }}74+ # Test them only on the latest Go to reduce CI time.
75+ if: startsWith(matrix.go, '1.26.')
75 run: |76 run: |
76- # Check cross-compiling Linux binaries for loong64.77+ # Check cross-compiling Linux binaries for minor architectures.
77- # Loong64 support internal linking from go1.25.
78 env GOOS=linux GOARCH=loong64 go build -v ./...78 env GOOS=linux GOARCH=loong64 go build -v ./...
79+ env GOOS=linux GOARCH=ppc64le go build -v ./...
80+ env GOOS=linux GOARCH=riscv64 go build -v ./...
79 81
80 - name: go build (plugin)82 - name: go build (plugin)
81 if: runner.os == 'Linux' || runner.os == 'macOS'83 if: runner.os == 'Linux' || runner.os == 'macOS'
@@ -140,36 +142,6 @@ jobs:
140 go env -u CC142 go env -u CC
141 go env -u CXX143 go env -u CXX
142 144
143- - name: go test (Linux ppc64le)
144- if: ${{ runner.os == 'Linux' && runner.arch != 'ARM64' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') }}
145- run: |
146- sudo apt-get update
147- sudo apt-get install -y gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu qemu-user
148- go env -w CC=powerpc64le-linux-gnu-gcc
149- go env -w CXX=powerpc64le-linux-gnu-g++
150- env GOOS=linux GOARCH=ppc64le CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
151- env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
152- env GOOS=linux GOARCH=ppc64le CGO_ENABLED=1 go test -c -o=purego-test-cgo .
153- env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
154- go env -u CC
155- go env -u CXX
156-
157- - name: go test (Linux riscv64)
158- if: ${{ runner.os == 'Linux' && runner.arch != 'ARM64' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.20.') && !startsWith(matrix.go, '1.21.') }}
159- run: |
160- sudo apt-get update
161- sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user
162- go env -w CC=riscv64-linux-gnu-gcc
163- go env -w CXX=riscv64-linux-gnu-g++
164- # Create symlink for the dynamic linker that QEMU expects
165- sudo ln -sf /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld.so.1
166- env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
167- env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
168- env GOOS=linux GOARCH=riscv64 CGO_ENABLED=1 go test -c -o=purego-test-cgo .
169- env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
170- go env -u CC
171- go env -u CXX
172-
173 - name: go test race (no Cgo)145 - name: go test race (no Cgo)
174 if: ${{ runner.os == 'macOS' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') }}146 if: ${{ runner.os == 'macOS' && !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') }}
175 run: |147 run: |
@@ -181,26 +153,34 @@ jobs:
181 run: |153 run: |
182 env CGO_ENABLED=1 go test -race -shuffle=on -v -count=10 ./...154 env CGO_ENABLED=1 go test -race -shuffle=on -v -count=10 ./...
183 155
184- loong:156+ minor-arches:
185 strategy:157 strategy:
186 matrix:158 matrix:
187- # Loong64 support internal linking from go1.25.159+ # Test them only on the latest Go to reduce CI time.
188- go: ['1.25.x', '1.26.x']160+ go: ['1.26.x']
189- name: Test with Go ${{ matrix.go }} on Linux loong64161+ name: Test with Go ${{ matrix.go }} on Linux minor architectures
190 runs-on: ubuntu-latest162 runs-on: ubuntu-latest
191 defaults:163 defaults:
192 run:164 run:
193 shell: bash165 shell: bash
194 steps:166 steps:
195- - uses: actions/checkout@v5167+ - name: Checkout
168+ uses: actions/checkout@v5
169+
196 - name: Setup Go170 - name: Setup Go
197 uses: actions/setup-go@v6171 uses: actions/setup-go@v6
198 with:172 with:
199 go-version: ${{ matrix.go }}173 go-version: ${{ matrix.go }}
174+
200 - name: Set up the prerequisites175 - name: Set up the prerequisites
201 run: |176 run: |
202 sudo apt-get update177 sudo apt-get update
203- sudo apt-get install -y gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu qemu-user178+ sudo apt-get install -y \
179+ gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu \
180+ gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu \
181+ gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \
182+ qemu-user
183+
204 - name: go test (Linux loong64)184 - name: go test (Linux loong64)
205 run: |185 run: |
206 go env -w CC=loongarch64-linux-gnu-gcc-14186 go env -w CC=loongarch64-linux-gnu-gcc-14
@@ -212,6 +192,30 @@ jobs:
212 go env -u CC192 go env -u CC
213 go env -u CXX193 go env -u CXX
214 194
195+ - name: go test (Linux ppc64le)
196+ run: |
197+ go env -w CC=powerpc64le-linux-gnu-gcc
198+ go env -w CXX=powerpc64le-linux-gnu-g++
199+ env GOOS=linux GOARCH=ppc64le CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
200+ env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
201+ env GOOS=linux GOARCH=ppc64le CGO_ENABLED=1 go test -c -o=purego-test-cgo .
202+ env QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu qemu-ppc64le ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
203+ go env -u CC
204+ go env -u CXX
205+
206+ - name: go test (Linux riscv64)
207+ run: |
208+ go env -w CC=riscv64-linux-gnu-gcc
209+ go env -w CXX=riscv64-linux-gnu-g++
210+ # Create symlink for the dynamic linker that QEMU expects
211+ sudo ln -sf /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld.so.1
212+ env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go test -c -o=purego-test-nocgo .
213+ env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-nocgo -test.shuffle=on -test.v -test.count=10
214+ env GOOS=linux GOARCH=riscv64 CGO_ENABLED=1 go test -c -o=purego-test-cgo .
215+ env QEMU_LD_PREFIX=/usr/riscv64-linux-gnu qemu-riscv64 ./purego-test-cgo -test.shuffle=on -test.v -test.count=10
216+ go env -u CC
217+ go env -u CXX
218+
215 bsd:219 bsd:
216 strategy:220 strategy:
217 matrix:221 matrix:

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close