Skip to content

Commit

Permalink
Use alpine shell to load x86_64 and arm64 arch for RandomY lib (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaZezulinsky authored Oct 21, 2024
1 parent b9c84e3 commit 8a83bdc
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
config:
- {arch: x86_64, branch: latest-stable}
- {arch: aarch64, branch: latest-stable}
- {arch: riscv64, branch: edge}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -21,7 +20,9 @@ jobs:
shell: alpine.sh --root {0}
run: apk add git cmake gcc g++ make go
- name: Test
shell: alpine.sh --root {0}
run: go test -v

build-windows:
runs-on: windows-latest
steps:
Expand All @@ -30,9 +31,10 @@ jobs:
- name: Setup
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.23
- name: Test
run: go test -v

build-darwin:
strategy:
matrix:
Expand All @@ -46,12 +48,13 @@ jobs:
- name: Setup
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.23
- name: Test
run: |
export GOARCH=${{ matrix.config.arch }}
export GOOS=darwin
go test -v
release:
needs: [build-alpine, build-windows, build-darwin]
runs-on: ubuntu-latest
Expand Down
Binary file modified build/darwin-arm64/librandomx.a
Binary file not shown.
Binary file modified build/darwin-x86_64/librandomx.a
Binary file not shown.
Binary file removed build/linux-aarch64/librandomx.a
Binary file not shown.
Binary file modified build/linux-arm64/librandomx.a
Binary file not shown.
Binary file modified build/linux-x86_64/librandomx.a
Binary file not shown.
2 changes: 0 additions & 2 deletions randomy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ package randomy
//#cgo LDFLAGS: -lrandomx -lstdc++
//#cgo linux,amd64 LDFLAGS:-L${SRCDIR}/build/linux-x86_64 -lm
//#cgo linux,arm64 LDFLAGS:-L${SRCDIR}/build/linux-arm64 -lm
//#cgo linux,aarch64 LDFLAGS:-L${SRCDIR}/build/linux-aarch64 -lm
//#cgo linux,riscv64 LDFLAGS:-L${SRCDIR}/build/linux-riscv64 -lm
//#cgo darwin,amd64 LDFLAGS:-L${SRCDIR}/build/darwin-x86_64 -lm
//#cgo darwin,arm64 LDFLAGS:-L${SRCDIR}/build/darwin-arm64 -lm
//#cgo windows,amd64 LDFLAGS:-L${SRCDIR}/build/windows-x86_64
Expand Down

0 comments on commit 8a83bdc

Please sign in to comment.