forked from lxc/incus
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (85 loc) · 2.35 KB
/
build.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
shellcheck:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Differential ShellCheck
id: ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact with ShellCheck defects in SARIF format
uses: actions/upload-artifact@v4
with:
name: Differential ShellCheck SARIF
path: ${{ steps.ShellCheck.outputs.sarif }}
build:
strategy:
fail-fast: false
matrix:
go:
- oldstable
- stable
- tip
runs-on: ubuntu-22.04
steps:
- name: Install Dependencies
run: |
sudo add-apt-repository ppa:cowsql/stable -y --no-update
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
autoconf \
automake \
libcowsql-dev \
libacl1-dev \
libcap-dev \
liblxc1 \
liblz4-dev \
libsqlite3-dev \
libudev-dev \
libuv1-dev \
lxc-dev \
make \
pkg-config
- name: Checkout
uses: actions/checkout@v4
- name: Install Go (${{ matrix.go != 'tip' && matrix.go || 'stable' }})
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go != 'tip' && matrix.go || 'stable' }}
- name: Install Go (tip)
if: matrix.go == 'tip'
run: |
go install golang.org/dl/gotip@latest
gotip download
~/sdk/gotip/bin/go version
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
- name: Save Go env
id: go-env
run: go env >> $GITHUB_OUTPUT
- name: Check compatible min Go version
run: |
go mod tidy
- name: Download go dependencies
run: |
go mod download
- name: Run Incus build
run: |
make
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: incus
path: |
.
${{ steps.go-env.outputs.GOPATH }}