1
1
mirror of https://github.com/walles/moar.git synced 2024-11-22 03:14:56 +03:00

Enable running tests in 32 bit mode

One is failing.

Ref: https://github.com/walles/moar/issues/140
This commit is contained in:
Johan Walles 2023-07-08 09:53:11 +02:00
parent daafbcdac4
commit fbc1dc9e49
4 changed files with 19 additions and 1 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
/releases

View File

@ -15,7 +15,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
# golangci-lint is required by test.sh. Latest version here if you want # golangci-lint is required by test.sh. Latest version here if you want
# to bump it, version number is at the end of the "curl | sh" # to bump it, version number is at the end of the "curl | sh"
@ -25,3 +25,4 @@ jobs:
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)"/bin v1.51.2 run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)"/bin v1.51.2
- run: ./test.sh - run: ./test.sh
- run: GOARCH=386 ./test.sh

13
Dockerfile-test-386 Normal file
View File

@ -0,0 +1,13 @@
# Run the tests in 32 bit mode:
# docker build . -f Dockerfile-test-386
FROM golang:1.20
WORKDIR /moar
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN GOARCH=386 go test -v ./...

View File

@ -184,6 +184,9 @@ Run tests:
./test.sh ./test.sh
``` ```
To run tests in 32 bit mode, either do `GOARCH=386 ./test.sh` if you're on
Linux, or `docker build . -f Dockerfile-test-386` (tested on macOS).
Run microbenchmarks: Run microbenchmarks:
```bash ```bash