Skip to content

Commit

Permalink
running new targets and archs
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaZezulinsky committed Oct 20, 2024
1 parent d524c34 commit 77a9b00
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
name: go-randomy build
on: [push]
jobs:
test:
name: Build
build-alpine:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, raspbian-private, macos-latest]
config:
- {arch: aarch64, branch: latest-stable}
- {arch: armv7, branch: latest-stable}
- {arch: riscv64, branch: edge}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.config.arch }}
branch: ${{ matrix.config.branch }}
- name: Install deps
shell: alpine.sh --root {0}
run: apk add git cmake gcc g++ make go
- name: Test
run: go test -v
build:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{matrix.platform}}
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test
run: go test -v
release:
needs: test
needs: [build-alpine, build]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Bump version
id: version_bump
uses: anothrNick/github-tag-action@v1
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 added build/linux-aarch64/librandomx.a
Binary file not shown.
Binary file added build/linux-armv7/librandomx.a
Binary file not shown.
Binary file added build/linux-riscv64/librandomx.a
Binary file not shown.
Binary file modified build/linux-x86_64/librandomx.a
Binary file not shown.
Binary file modified build/windows-x86_64/librandomx.a
Binary file not shown.
4 changes: 4 additions & 0 deletions randomy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ 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 linux,armv7 LDFLAGS:-L${SRCDIR}/build/linux-armv7 -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
//#include <stdlib.h>
//#include "randomy.h"
darwin-arm64 darwin-x86_64 linux-aarch64 linux-arm64 linux-armv7 linux-riscv64 linux-x86_64 windows-x86_64

Check failure on line 15 in randomy.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

syntax error: non-declaration statement outside function body

Check failure on line 15 in randomy.go

View workflow job for this annotation

GitHub Actions / build (macos-latest)

syntax error: non-declaration statement outside function body
import "C"

Check failure on line 16 in randomy.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

syntax error: imports must appear before other declarations

Check failure on line 16 in randomy.go

View workflow job for this annotation

GitHub Actions / build (macos-latest)

syntax error: imports must appear before other declarations
import (
"errors"
Expand Down

0 comments on commit 77a9b00

Please sign in to comment.