Skip to content

Commit

Permalink
use the latest randomy
Browse files Browse the repository at this point in the history
* added darwin-arm64, linux-riscv64 and linux-aarch64 architecture
  • Loading branch information
SashaZezulinsky committed Oct 21, 2024
1 parent c3f682d commit ecd9bd8
Showing 1 changed file with 64 additions and 18 deletions.
82 changes: 64 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
name: go-core build
on: push
jobs:
build:
strategy:
matrix:
platform: [
{os: ubuntu-latest, path: linux-x86_64},
{os: windows-latest, path: windows-x86_64},
{os: raspbian-private, path: linux-arm64},
{os: macos-latest, path: darwin-x86_64},
]
runs-on: ${{ matrix.platform.os }}
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.23
- name: Setup MSYS
if: ${{ matrix.platform.os == 'windows-latest' }}
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
Expand All @@ -39,7 +30,7 @@ jobs:
run: |
make gocore
make test
- name: Build
- name: Build & Test
if: ${{ matrix.platform.os != 'windows-latest' }}
run: |
make gocore
Expand All @@ -50,9 +41,62 @@ jobs:
with:
name: gocore-${{ matrix.platform.path }}
path: ./build/bin/gocore*
build-mac:
matrix:
strategy:
config:
- {os: macos-13, path: darwin-x86_64},
- {os: macos-latest, path: darwin-arm64},
runs-on: ${{ matrix.config.os }}
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Build & Test
run: |
make gocore
make test
- name: Upload Gocore
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v2
with:
name: gocore-${{ matrix.config.path }}
path: ./build/bin/gocore*
build-alpine:
strategy:
matrix:
config:
- {arch: x86_64, branch: latest-stable}
- {arch: aarch64, branch: latest-stable}
- {arch: riscv64, branch: edge}
needs: build
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: Build & Test
run: |
make gocore
make test
- name: Upload Gocore
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v2
with:
name: gocore-linux-${{ matrix.config.arch }}
path: ./build/bin/gocore*
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
needs: [build-windows, build-mac, build-alpine]
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
Expand Down Expand Up @@ -80,12 +124,14 @@ jobs:
platform: [
{path: linux-x86_64, file_ext: ""},
{path: windows-x86_64, file_ext: ".exe"},
{path: linux-arm64, file_ext: ""},
{path: linux-aarch64, file_ext: ""},
{path: linux-riscv64, file_ext: ""},
{path: darwin-x86_64, file_ext: ""},
{path: darwin-arm64, file_ext: ""},
]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Artifact Gocore
uses: actions/download-artifact@v2
with:
Expand Down

0 comments on commit ecd9bd8

Please sign in to comment.