Skip to content

Commit

Permalink
Update action for Go (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrostam authored Oct 31, 2023
1 parent 14ef147 commit 7879824
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/go-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]


steps:
- uses: actions/checkout@v3

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Setup go
uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -77,11 +84,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: ['1.18']
go: [ 'stable' ]

steps:
- uses: actions/checkout@v3

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Setup go
uses: actions/setup-go@v4
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [ '1.16', '1.17', '1.18' ]
go: [ '1.16', '1.17', '1.18', '1.19', '1.20', 'stable' ]

steps:
- uses: actions/checkout@v3

- name: Set up Mingw
uses: egor-tensin/setup-mingw@v2
if: ${{ (matrix.os == 'windows-latest') && (matrix.go != 'stable') && (matrix.go < 1.20) }}
with:
version: 11.2.0

- name: Setup go
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

Expand Down Expand Up @@ -84,4 +90,4 @@ jobs:
run: go build

- name: Test
run: go test -modfile=go_test.mod -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
run: go test -timeout 30m -modfile=go_test.mod -v -access_key ${{secrets.PV_VALID_ACCESS_KEY}}
2 changes: 2 additions & 0 deletions binding/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Leopard is an on-device speech-to-text engine. Leopard is:

- go 1.16+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
- **Windows**: The Go binding requires `cgo`, which means that you need to install a gcc compiler like [Mingw](http://mingw-w64.org/) to build it properly.
- Go versions less than `1.20` requires `gcc` version `11` or lower.

## Installation

Expand Down

0 comments on commit 7879824

Please sign in to comment.