Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,34 @@ jobs:
GOOS=js GOARCH=wasm go build ./...
GOOS=darwin GOARCH=arm64 go build ./...
GOOS=windows GOARCH=amd64 go build ./...

# Cross-compiling proves the code COMPILES for an architecture; it does not
# prove it computes the right answer there. This package reads a PDF: xref
# offsets, stream lengths and object numbers, all of them numbers taken out of
# a file and held in an int.
#
# s390x is BIG-ENDIAN and 386/arm are 32-bit, so between them these lanes
# cover both assumptions a byte-stream reader can carry without knowing it.
# poppler and pdfium test on none of the four 64-bit arches; 32-bit ARM they
# do hold, and we did not.
arch-qemu:
name: arch ${{ matrix.goarch }} (qemu)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { goarch: riscv64, qemu: qemu-riscv64-static }
- { goarch: loong64, qemu: qemu-loongarch64-static }
- { goarch: ppc64le, qemu: qemu-ppc64le-static }
- { goarch: s390x, qemu: qemu-s390x-static }
- { goarch: "386", qemu: qemu-i386-static }
- { goarch: arm, qemu: qemu-arm-static }
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: "1.27.1"
- run: sudo apt-get update && sudo apt-get install -y qemu-user-static
- name: Test under qemu (${{ matrix.goarch }})
run: GOARCH=${{ matrix.goarch }} go test -exec=${{ matrix.qemu }} ./...
Loading