Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,32 @@ on:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go-version:
- 1.18.x
- 1.19.x
- 1.20.x

steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.19
go-version: ${{ matrix.go-version }}
id: go
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Test
run: |
cd bindings/go
CGO_CFLAGS="-O2 -D__BLST_PORTABLE__" go test
go test
- name: Benchmark
run: |
cd bindings/go
CGO_CFLAGS="-O2 -D__BLST_PORTABLE__" go test -bench=Benchmark
- name: Check headers
run: |
cmp blst/bindings/blst.h bindings/go/blst_headers/blst.h
cmp blst/bindings/blst_aux.h bindings/go/blst_headers/blst_aux.h
go test -bench=Benchmark
4 changes: 1 addition & 3 deletions bindings/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ go get github.com/ethereum/c-kzg-4844

## Go version

This package requires `1.19rc1` or later. Version `1.19beta1` and before will
not work. These versions have a linking issue and are unable to see `blst`
functions.
This package should work with Go 1.11 and later.

## Example

Expand Down
8 changes: 8 additions & 0 deletions bindings/go/blst.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* For CGO to assemble the blst assembly files, the file MUST exist in the same
* directory as the main.go file. Instead of copying the whole
* blst/build/assembly.S file here, it should have the same effect to include
* it. Keep in mind, this while not work on Windows systems compiling with
* MSVC, but it will work with mingw32.
*/
#include "assembly.S"
Loading