diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..54f1d00 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +/releases diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 0d45df3..c20c452 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" # 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" @@ -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: ./test.sh + - run: GOARCH=386 ./test.sh diff --git a/Dockerfile-test-386 b/Dockerfile-test-386 new file mode 100644 index 0000000..e7acd19 --- /dev/null +++ b/Dockerfile-test-386 @@ -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 ./... diff --git a/README.md b/README.md index 6c27004..aca6749 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,9 @@ Run tests: ./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: ```bash