forked from coreos/go-systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 1.52 KB
/
go.yml
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
55
56
57
58
59
---
name: Go
"on":
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
# Minimum supported Go toolchain
ACTION_MINIMUM_TOOLCHAIN: "1.12"
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17', '1.18']
steps:
- run: sudo apt-get -qq update
- name: Install libsystemd-dev
run: sudo apt-get install libsystemd-dev
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Go fmt
run: ./scripts/ci-runner.sh go_fmt
- name: Go build (source)
run: ./scripts/ci-runner.sh build_source
- name: Go build (tests)
run: ./scripts/ci-runner.sh build_tests
- name: Go vet
run: ./scripts/ci-runner.sh go_vet
build-minimum:
name: "Build on minimum supported toolchain"
runs-on: ubuntu-latest
steps:
- run: sudo apt-get -qq update
- name: Install libsystemd-dev
run: sudo apt-get install libsystemd-dev
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ env['ACTION_MINIMUM_TOOLCHAIN'] }}
- name: Go fmt
run: ./scripts/ci-runner.sh go_fmt
- name: Go build (source)
run: ./scripts/ci-runner.sh build_source
- name: Go build (tests)
run: ./scripts/ci-runner.sh build_tests
- name: Go vet
run: ./scripts/ci-runner.sh go_vet