diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1bba85e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: Test (Go ${{ matrix.go-version }}, ${{ matrix.arch }}) + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + include: + - go-version: stable + runs-on: ubuntu-24.04 + arch: amd64 + - go-version: stable + runs-on: ubuntu-24.04-arm + arch: arm64 + - go-version: oldstable + runs-on: ubuntu-24.04 + arch: amd64 + - go-version: oldstable + runs-on: ubuntu-24.04-arm + arch: arm64 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + - run: ./format_check.sh + - run: go test ./... + - run: go build ./... + + build-arm32: + name: Build (Go ${{ matrix.go-version }}, arm) + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + go-version: + - stable + - oldstable + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + - run: GOOS=linux GOARCH=arm go build ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 41321af..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go -sudo: false -notifications: - email: false -go: - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - -script: - - ./format_check.sh - - go test - - GOARCH=386 go build - - GOARCH=arm go build diff --git a/README.md b/README.md index 0001046..fa4ad4f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BME280 driver [![GoDoc](https://godoc.org/github.com/maciej/bme280?status.svg)](https://godoc.org/github.com/maciej/bme280) -[![Build Status](https://travis-ci.org/maciej/bme280.svg?branch=master)](https://travis-ci.org/maciej/bme280) +[![CI](https://github.com/maciej/bme280/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/maciej/bme280/actions/workflows/ci.yml) Go driver for the Bosch BME280 sensor. diff --git a/bme280.go b/bme280.go index 91b5073..187955b 100644 --- a/bme280.go +++ b/bme280.go @@ -32,7 +32,7 @@ const ( ModeNormal Mode = 0x03 ) -//noinspection GoUnusedConst,GoSnakeCaseUsage +// noinspection GoUnusedConst,GoSnakeCaseUsage const ( I2CAddr = 0x77