fix: fix field alignment to avoid panics on 32bit OSes #149
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [ amd64, '386' ] | |
exclude: | |
- platform: macos-latest | |
architecture: '386' | |
- platform: windows-latest | |
architecture: '386' | |
include: | |
- architecture: '386' | |
# 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.architecture }} | |
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 ./... |