Support purego build via RandomX softfloat64
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2024-04-17 06:13:52 +02:00
parent e321374da1
commit 137356ee20
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
5 changed files with 39 additions and 8 deletions

View file

@ -1,7 +1,7 @@
---
kind: pipeline
type: docker
name: from-source-amd64
name: amd64
platform:
os: linux
arch: amd64
@ -50,7 +50,7 @@ steps:
- apk update
- apk add --no-cache git gcc g++ musl-dev pkgconfig
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v $0 || exit 255'
- name: test-go
- name: test-go-asm
image: golang:1.22-alpine3.19
depends_on:
- init-tests
@ -64,10 +64,24 @@ steps:
- apk update
- apk add --no-cache git
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -p 1 -failfast -timeout 20m -cover -v $0 || exit 255'
- name: test-go-purego
image: golang:1.22-alpine3.19
depends_on:
- init-tests
environment:
MONEROD_RPC_URL:
from_secret: MONEROD_RPC_URL
MONEROD_ZMQ_URL:
from_secret: MONEROD_ZMQ_URL
CGO_ENABLED: "0"
commands:
- apk update
- apk add --no-cache git
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -tags purego -p 1 -failfast -timeout 20m -cover -v $0 || exit 255'
---
kind: pipeline
type: docker
name: from-source-arm64
name: arm64
platform:
os: linux
arch: arm64
@ -129,4 +143,18 @@ steps:
- apk update
- apk add --no-cache git
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -p 1 -failfast -timeout 20m -cover -v $0 || exit 255'
- name: test-go-purego
image: golang:1.22-alpine3.19
depends_on:
- init-tests
environment:
MONEROD_RPC_URL:
from_secret: MONEROD_RPC_URL
MONEROD_ZMQ_URL:
from_secret: MONEROD_ZMQ_URL
CGO_ENABLED: "0"
commands:
- apk update
- apk add --no-cache git
- go list -f '{{.Dir}}/...' -m | xargs -n 1 sh -c 'go test -tags purego -p 1 -failfast -timeout 20m -cover -v $0 || exit 255'
...

3
go.mod
View file

@ -5,7 +5,7 @@ go 1.22
require (
git.gammaspectra.live/P2Pool/edwards25519 v0.0.0-20240405085108-e2f706cb5c00
git.gammaspectra.live/P2Pool/go-json v0.99.0
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.1.0
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.2.0
git.gammaspectra.live/P2Pool/monero-base58 v1.0.0
git.gammaspectra.live/P2Pool/randomx-go-bindings v1.0.0
git.gammaspectra.live/P2Pool/sha3 v0.17.0
@ -19,6 +19,7 @@ require (
)
require (
git.gammaspectra.live/P2Pool/softfloat64 v1.0.0 // indirect
github.com/dolthub/maphash v0.1.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
)

6
go.sum
View file

@ -2,14 +2,16 @@ git.gammaspectra.live/P2Pool/edwards25519 v0.0.0-20240405085108-e2f706cb5c00 h1:
git.gammaspectra.live/P2Pool/edwards25519 v0.0.0-20240405085108-e2f706cb5c00/go.mod h1:FZsrMWGucMP3SZamzrd7m562geIs5zp1O/9MGoiAKH0=
git.gammaspectra.live/P2Pool/go-json v0.99.0 h1:TbFOEWbbDLFzm1fM/2+WPUhhzSwJ501+otfrQ8jCP84=
git.gammaspectra.live/P2Pool/go-json v0.99.0/go.mod h1:X9PvT0fmWrU1I+BiDUjMypUWdsWFm24QCW1sWxbzT8w=
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.1.0 h1:L1fV2XBYFmpFU+JKP/7fsgDm2Lfh9yFlS+800v+3OsM=
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.1.0/go.mod h1:vNmHlEIRAcU/bA85mxbUKEiBYtrtS4MVwozf29KmoHM=
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.2.0 h1:ABLqnlKrv0pkSXyEWZ6C4PzLvQp/lkhTwKM21nZbN4Q=
git.gammaspectra.live/P2Pool/go-randomx/v2 v2.2.0/go.mod h1:eYjslaVjiP4C3mYGKgkjpseLgsD5kKBuOcZJy9KPJ78=
git.gammaspectra.live/P2Pool/monero-base58 v1.0.0 h1:s8LZxVNc93YEs2NCCNWZ7CKr8RbEb031y6Wkvhn+TS4=
git.gammaspectra.live/P2Pool/monero-base58 v1.0.0/go.mod h1:WWEJy/AdWKxKAruvlKI82brw+DtVlePy0ct3ZiBlc68=
git.gammaspectra.live/P2Pool/randomx-go-bindings v1.0.0 h1:tajr4QFSPrb8NtHmU14JaXdhr+z+0RbOBLIgUDI5Tow=
git.gammaspectra.live/P2Pool/randomx-go-bindings v1.0.0/go.mod h1:S17NNidG5hxqaVLsSykKqDBg/hTPSzP0KcSwXfH8WIA=
git.gammaspectra.live/P2Pool/sha3 v0.17.0 h1:CZpB466LPbNVQrUNjQTtQScGDc30xSMkZ6Bmw0W9VuM=
git.gammaspectra.live/P2Pool/sha3 v0.17.0/go.mod h1:HmrrYa97BZTKklUk2n/wAY+wrY0gHhoSGRd2+lIqXq8=
git.gammaspectra.live/P2Pool/softfloat64 v1.0.0 h1:XqxDpowntpV8gvBzG9bMC8VVzxZJT/YEk7BfwmaCamU=
git.gammaspectra.live/P2Pool/softfloat64 v1.0.0/go.mod h1:ZhnGqXOS6F6aJpiiT38Cvk5eHoBNqjkKfp3w3AcnomA=
git.gammaspectra.live/P2Pool/zmq4 v0.99.0 h1:DYjOTqZKurPLn+/OvC8wFE0+cMnw9bp6CQnzwqAbrXA=
git.gammaspectra.live/P2Pool/zmq4 v0.99.0/go.mod h1:VZEQMCQTRVzrvGZl1E225PPKHl9UQ47CEBvrYkqWKZs=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

View file

@ -1,4 +1,4 @@
//go:build cgo && !disable_randomx_library
//go:build cgo && !disable_randomx_library && !purego
package randomx

View file

@ -1,4 +1,4 @@
//go:build !cgo || disable_randomx_library
//go:build !cgo || disable_randomx_library || purego
package randomx