Skip to content

Commit

Permalink
migrated CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dh1tw committed Jan 28, 2024
1 parent 85e1e8e commit 8e96234
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 2 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Cross Platform build

on: [push, pull_request]

jobs:
linux:
runs-on: ubuntu-22.04
strategy:
matrix:
go: ["1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "1.12", "1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
steps:
-
name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
id: go
with:
go-version: ${{ matrix.go }}
-
name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
-
name: Install dependencies
run: |
sudo apt-get install -y libsamplerate0 libsamplerate0-dev
-
name: Compile
run: go build
-
name: Execute Unit Tests
run: go test ./...

macos:
runs-on: macos-latest
strategy:
matrix:
go: ["1.11", "1.12", "1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
steps:
-
name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
id: go
with:
go-version: ${{ matrix.go }}
-
name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
-
name: Install dependencies
run: brew install libsamplerate
-
name: Compile
run: go build
-
name: Execute Unit Tests
run: go test ./...


update_code_coverage:
runs-on: ubuntu-22.04
steps:
-
name: Set up Go 1.21
uses: actions/setup-go@v4
id: go
with:
go-version: 1.21
-
name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
-
name: Install dependencies
run: |
sudo apt-get install -y libsamplerate0 libsamplerate0-dev
-
name: Execute Unit Tests
run: go test -race -coverprofile=coverage.out -covermode=atomic
-
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
.vscode/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# libsamplerate binding for Golang
[![Go Report Card](https://goreportcard.com/badge/github.com/dh1tw/gosamplerate)](https://goreportcard.com/report/github.com/dh1tw/gosamplerate)
[![Build Status](https://travis-ci.com/dh1tw/gosamplerate.svg?branch=master)](https://travis-ci.com/dh1tw/gosamplerate)
[![Coverage Status](https://coveralls.io/repos/github/dh1tw/gosamplerate/badge.svg?branch=master)](https://coveralls.io/github/dh1tw/gosamplerate?branch=master)
![Build Status](https://github.com/dh1tw/gosamplerate/workflows/Cross%20Platform%20build/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/dh1tw/gosamplerate/graph/badge.svg?token=5vIJOLA5hI)](https://codecov.io/gh/dh1tw/gosamplerate)

This is a [Golang](https://golang.org) binding for [libsamplerate](http://www.mega-nerd.com/SRC/index.html) (written in C), probably the best audio Sample Rate Converter available to today.

Expand Down

0 comments on commit 8e96234

Please sign in to comment.