-
Notifications
You must be signed in to change notification settings - Fork 205
143 lines (135 loc) · 3.87 KB
/
ci.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: CI
on:
push:
branches:
- main
- 'release-*'
pull_request:
branches:
- main
- 'release-*'
env:
K8S_VERSION: 1.27.1
permissions:
contents: read
jobs:
docs:
name: Check docs are buildable
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up doc directory
run: |
mkdir $HOME/output
touch $HOME/output/.nojekyll
- name: Build latest
run: |
GITHUB_SHA=$(git rev-parse HEAD)
export GITHUB_SHA
rm -rf _work/venv
make vhtml
mv _build/html/* $HOME/output/
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.1
args: -v --timeout 5m
build:
name: Build and check device plugins
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: Check Dockerfiles
run: make check-dockerfiles
- run: make go-mod-tidy
- run: make BUILDTAGS=kerneldrv
- run: make test BUILDTAGS=kerneldrv
- name: Install envtest tool and run envtest
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
setup-envtest use ${K8S_VERSION}
- run: |
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make envtest
- run: make check-github-actions
- name: Codecov report
run: bash <(curl -s https://codecov.io/bash)
image:
name: Build image
runs-on: ubuntu-22.04
strategy:
matrix:
image:
- intel-fpga-admissionwebhook
- intel-fpga-initcontainer
- intel-gpu-fakedev
- intel-gpu-initcontainer
- intel-gpu-plugin
- intel-fpga-plugin
- intel-qat-initcontainer
- intel-qat-plugin
- intel-qat-plugin-kerneldrv
- intel-deviceplugin-operator
- intel-sgx-admissionwebhook
- intel-sgx-plugin
- intel-sgx-initcontainer
- intel-dsa-plugin
- intel-iaa-plugin
- intel-idxd-config-initcontainer
- intel-dlb-plugin
- intel-dlb-initcontainer
- intel-xpumanager-sidecar
# Demo images
- crypto-perf
- accel-config-demo
- intel-opencl-icd
- opae-nlb-demo
- openssl-qat-engine
- sgx-sdk-demo
- sgx-aesmd-demo
- dlb-dpdk-demo
- dlb-libdlb-demo
builder: [buildah, docker]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- run: make -e vendor
- name: Build image
env:
IMAGE_NAME: ${{ matrix.image }}
BUILDER_NAME: ${{ matrix.builder }}
run: |
make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
terrascan:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install terrascan
run: |
curl -sL "$(curl -sL https://api.github.com/repos/tenable/terrascan/releases/latest | grep -o -E "https://.+?_Linux_x86_64.tar.gz")" > terrascan.tar.gz
tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz
install terrascan /usr/local/bin && rm terrascan
- name: Run Terrascan
run: make terrascan