@@ -2,142 +2,29 @@ name: CI
22on :
33 push :
44 branches :
5- - main
65 - ' release-*'
76 pull_request :
87 branches :
98 - main
109 - ' release-*'
11- env :
12- K8S_VERSION : 1.27.1
1310permissions :
1411 contents : read
12+ pull-requests : read
1513
1614jobs :
15+ trivy :
16+ uses : " ./.github/workflows/lib-trivy.yaml"
1717
18- docs :
19- name : Check docs are buildable
20- runs-on : ubuntu-22.04
21- steps :
22- - name : Install dependencies
23- run : |
24- sudo apt-get update
25- sudo apt-get install -y python3-venv
26- - uses : actions/checkout@v3
27- with :
28- fetch-depth : 0
29- - name : Set up doc directory
30- run : |
31- mkdir $HOME/output
32- touch $HOME/output/.nojekyll
33- - name : Build latest
34- run : |
35- GITHUB_SHA=$(git rev-parse HEAD)
36- export GITHUB_SHA
37- rm -rf _work/venv
38- make vhtml
39- mv _build/html/* $HOME/output/
40-
41- golangci :
42- permissions :
43- contents : read # for actions/checkout to fetch code
44- pull-requests : read # for golangci/golangci-lint-action to fetch pull requests
45- name : lint
46- runs-on : ubuntu-22.04
47- steps :
48- - uses : actions/checkout@v3
49- - uses : actions/setup-go@v4
50- with :
51- go-version-file : go.mod
52- check-latest : true
53- - name : golangci-lint
54- uses : golangci/golangci-lint-action@v3
55- with :
56- version : v1.52.1
57- args : -v --timeout 5m
18+ validate :
19+ uses : " ./.github/workflows/lib-validate.yaml"
5820
5921 build :
60- name : Build and check device plugins
61- runs-on : ubuntu-22.04
62- steps :
63- - uses : actions/checkout@v3
64- - uses : actions/setup-go@v4
65- with :
66- go-version-file : go.mod
67- check-latest : true
68- - name : Check Dockerfiles
69- run : make check-dockerfiles
70- - run : make go-mod-tidy
71- - run : make BUILDTAGS=kerneldrv
72- - run : make test BUILDTAGS=kerneldrv
73- - name : Install envtest tool and run envtest
74- run : |
75- go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
76- setup-envtest use ${K8S_VERSION}
77- - run : |
78- KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make envtest
79- - run : make check-github-actions
80- - name : Codecov report
81- run : bash <(curl -s https://codecov.io/bash)
82-
83- image :
84- name : Build image
85- runs-on : ubuntu-22.04
86- strategy :
87- matrix :
88- image :
89- - intel-fpga-admissionwebhook
90- - intel-fpga-initcontainer
91- - intel-gpu-fakedev
92- - intel-gpu-initcontainer
93- - intel-gpu-plugin
94- - intel-fpga-plugin
95- - intel-qat-initcontainer
96- - intel-qat-plugin
97- - intel-qat-plugin-kerneldrv
98- - intel-deviceplugin-operator
99- - intel-sgx-admissionwebhook
100- - intel-sgx-plugin
101- - intel-sgx-initcontainer
102- - intel-dsa-plugin
103- - intel-iaa-plugin
104- - intel-idxd-config-initcontainer
105- - intel-dlb-plugin
106- - intel-dlb-initcontainer
107- - intel-xpumanager-sidecar
108-
109- # Demo images
110- - crypto-perf
111- - accel-config-demo
112- - intel-opencl-icd
113- - opae-nlb-demo
114- - openssl-qat-engine
115- - sgx-sdk-demo
116- - sgx-aesmd-demo
117- - dlb-dpdk-demo
118- - dlb-libdlb-demo
119- builder : [buildah, docker]
120- steps :
121- - uses : actions/checkout@v3
122- - uses : actions/setup-go@v4
123- - run : make -e vendor
124- - name : Build image
125- env :
126- IMAGE_NAME : ${{ matrix.image }}
127- BUILDER_NAME : ${{ matrix.builder }}
128- run : |
129- make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
130-
131- terrascan :
132- runs-on : ubuntu-22.04
133- steps :
134- - name : Checkout repository
135- uses : actions/checkout@v3
136- - name : Install terrascan
137- run : |
138- 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
139- tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz
140- install terrascan /usr/local/bin && rm terrascan
141- - name : Run Terrascan
142- run : make terrascan
143-
22+ needs :
23+ - trivy
24+ - validate
25+ uses : " ./.github/workflows/lib-build.yaml"
26+
27+ e2e :
28+ needs :
29+ - build
30+ uses : " ./.github/workflows/lib-e2e.yaml"
0 commit comments