2020-11-18 21:55:10 +00:00
|
|
|
name: build
|
|
|
|
|
2021-02-19 20:34:27 +00:00
|
|
|
on: [push, pull_request]
|
2020-11-18 21:55:10 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
CGO_CFLAGS_ALLOW: -Xpreprocessor
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-02-19 20:34:27 +00:00
|
|
|
os: [ubuntu-18.04, ubuntu-20.04, macOS-10.15]
|
|
|
|
|
2020-11-18 21:55:10 +00:00
|
|
|
steps:
|
2021-02-19 20:34:27 +00:00
|
|
|
- name: Set up Go 1.x
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ^1.13
|
2020-11-18 21:55:10 +00:00
|
|
|
|
2021-02-19 20:34:27 +00:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
2020-11-18 21:55:10 +00:00
|
|
|
|
2021-02-19 20:34:27 +00:00
|
|
|
- name: Install linux deps
|
|
|
|
if: matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04'
|
|
|
|
run: |
|
|
|
|
sudo add-apt-repository -y ppa:tonimelisma/ppa
|
|
|
|
sudo apt-get -y install libvips-dev
|
|
|
|
- name: Install macos deps
|
|
|
|
if: matrix.os == 'macos-10.15'
|
|
|
|
run: |
|
|
|
|
brew install vips
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./cmd/fastgallery
|
2020-11-18 21:55:10 +00:00
|
|
|
|
2021-02-19 20:34:27 +00:00
|
|
|
- name: Test
|
|
|
|
run: go test -v -coverprofile=profile.cov ./...
|
2020-11-18 21:55:10 +00:00
|
|
|
|
2021-02-19 20:34:27 +00:00
|
|
|
- name: Coveralls
|
|
|
|
if: matrix.os == 'ubuntu-20.04'
|
|
|
|
uses: shogo82148/actions-goveralls@v1
|
|
|
|
with:
|
|
|
|
path-to-profile: profile.cov
|