build: add Github Action based CI build (#108)

* build: add Github Action based CI build
release
Ron Evans 2 years ago committed by GitHub
parent e7671110ad
commit 25349d381e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,48 +0,0 @@
version: 2.1
jobs:
build:
docker:
- image: tinygo/tinygo-dev
working_directory: /usr/local/go/src/github.com/tinygo-org/bluetooth
steps:
- checkout
- run: tinygo version
- run:
name: "Run unit tests"
command: go test
- run:
name: "Run TinyGo smoke tests"
command: make smoketest-tinygo
- run:
name: "Run Linux smoke tests"
command: make smoketest-linux
- run:
name: "Install Windows cross compiler"
command: |
# Install the tools themselves.
apt-get install -y gcc-mingw-w64-x86-64
- run:
name: "Run Windows smoke tests"
command: make smoketest-windows
build-macos:
macos:
xcode: "10.3.0"
steps:
- checkout
- run:
name: "Install dependencies"
command: |
curl https://dl.google.com/go/go1.15.14.darwin-amd64.tar.gz -o go1.15.14.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.15.14.darwin-amd64.tar.gz
ln -s /usr/local/go/bin/go /usr/local/bin/go
- run: go version
- run:
name: "Run macOS smoke tests"
command: make smoketest-macos
workflows:
test-all:
jobs:
- build
- build-macos

@ -0,0 +1,30 @@
name: Linux
on:
pull_request:
push:
branches:
- dev
- release
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container: tinygo/tinygo-dev
steps:
- name: Checkout
uses: actions/checkout@v2
- name: TinyGo version check
run: tinygo version
- name: Run unit tests
run: go test
- name: Run TinyGo smoke tests
run: make smoketest-tinygo
- name: Run Linux smoke tests
run: make smoketest-linux
- name: Install Windows cross compiler
run: |
apt-get install -y gcc-mingw-w64-x86-64
- name: "Run Windows smoke tests"
run: make smoketest-windows

@ -0,0 +1,28 @@
name: macOS
on:
pull_request:
push:
branches:
- dev
- release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
runs-on: macos-11
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.18.3'
- name: Checkout
uses: actions/checkout@v2
- name: Run unit tests
run: go test
- name: "Run macOS smoke tests"
run: make smoketest-macos

@ -2,8 +2,7 @@
[![Go Bluetooth](./images/gobluetooth.png)](https://tinygo.org/bluetooth)
[![PkgGoDev](https://pkg.go.dev/badge/pkg.go.dev/tinygo.org/x/bluetooth)](https://pkg.go.dev/tinygo.org/x/bluetooth)
[![CircleCI](https://circleci.com/gh/tinygo-org/bluetooth/tree/dev.svg?style=svg)](https://circleci.com/gh/tinygo-org/bluetooth/tree/dev)
[![PkgGoDev](https://pkg.go.dev/badge/pkg.go.dev/tinygo.org/x/bluetooth)](https://pkg.go.dev/tinygo.org/x/bluetooth) [![Linux](https://github.com/tinygo-org/bluetooth/actions/workflows/linux.yml/badge.svg?branch=dev)](https://github.com/tinygo-org/tinygo/actions/workflows/linux.yml) [![macOS](https://github.com/tinygo-org/bluetooth/actions/workflows/macos.yml/badge.svg?branch=dev)](https://github.com/tinygo-org/tinygo/actions/workflows/macos.yml)
Go Bluetooth is a cross-platform package for using [Bluetooth Low Energy](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy) hardware from the Go programming language.

Loading…
Cancel
Save