Skip to content

fix: fix field alignment to avoid panics on 32bit OSes #148

fix: fix field alignment to avoid panics on 32bit OSes

fix: fix field alignment to avoid panics on 32bit OSes #148

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Lint
run: make lint
test:
strategy:
matrix:
platform: [ ubuntu-latest, windows-latest, macos-latest ]
version: [ v1.19.x ]
# it seems that setup-go uses these values for the architecture, but
# I'm not sure and the source is inscrutable
architecture: [ x64, x32 ]
exclude:
- platform: macos-latest
architecture: x32
- platform: windows-latest
architecture: x32
include:
- architecture: x32
goarch: 386
# whether to enable the race detector - defaults to true
enable_race: 'false'
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.version }}
architecture: ${{ matrix.architecture }}
- name: Test
run: make test ENABLE_RACE=${{ matrix.enable_race }}
env:
CGO_ENABLED: '0'
GOARCH: ${{ matrix.goarch }}
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERAGE_VERSION: '1.19'
# test32bit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Test on 32-bit platform
# run: |
# docker build --platform=linux/386 -t test_32bit -f Dockerfile.test .
# docker run --platform=linux/386 --rm test_32bit go test ./...