Test Go bindings on all platforms (#332)

* Test Go bindings on all platforms

* Update setup-go action

* Specify flags in the env section
This commit is contained in:
Justin Traglia 2023-08-10 06:52:48 -05:00 committed by GitHub
parent de151d8fd7
commit f62c9738b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 9 deletions

View File

@ -9,24 +9,32 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ^1.19
go-version: stable
id: go
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Test
run: |
cd bindings/go
CGO_CFLAGS="-O2 -D__BLST_PORTABLE__" go test
run: go test
working-directory: bindings/go
env:
CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__"
- name: Benchmark
run: |
cd bindings/go
CGO_CFLAGS="-O2 -D__BLST_PORTABLE__" go test -bench=Benchmark
run: go test -bench=Benchmark
working-directory: bindings/go
env:
CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__"
- name: Check headers
run: |
cmp blst/bindings/blst.h bindings/go/blst_headers/blst.h