-
Notifications
You must be signed in to change notification settings - Fork 26
54 lines (51 loc) · 1.68 KB
/
build_and_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build and test
on: [pull_request, push]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23.4']
steps:
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Install dependencies
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- run: go version
- name: Build
run: go build ./...
- name: Test
run: go test -v -coverprofile=coverage.out ./...
- name: Check format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Vet
run: go vet ./...
- name: Staticcheck
uses: dominikh/staticcheck-action@v1.3.1
with:
version: "latest"
install-go: false
build-cuttlefish-cvdremote-debian-package:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23.4']
container:
image: debian@sha256:6a8bad8d20e1ca5ecbb7a314e51df6fca73fcce19af2778550671bdd1cbe7b43 # aka stable-20211011
steps:
- name: setup apt
run: apt update -y && apt upgrade -y
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Install dependencies
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: install debuild dependencies
run: apt install -y git devscripts config-package-dev debhelper-compat golang
- name: Build package
run: cd build/debian/cuttlefish_cvdremote && dpkg-buildpackage -i -uc -us -b
- name: Install package
run: dpkg -i build/debian/cuttlefish-cvdremote_*_*64.deb || apt-get install -f -y