Skip to content

ci: fix CI issues, add dependabot #22

ci: fix CI issues, add dependabot

ci: fix CI issues, add dependabot #22

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Install Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...
- name: Build
run: go build -v ./...
build:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- label: armv5
arch: arm
arm: 5
- label: armv6
arch: arm
arm: 6
- label: armv7
arch: arm
arm: 7
- label: arm64
arch: arm64
- label: amd64
arch: amd64
- label: i386
arch: 386
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...
env:
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.arm }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: avahi2dns-linux-${{ matrix.label }}
path: avahi2dns