mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
169 lines
5.1 KiB
YAML
169 lines
5.1 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'release-*'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release-*'
|
|
env:
|
|
RUNC_VERSION: v1.0.3
|
|
GO_VERSION: 1.17.4
|
|
K8S_VERSION: 1.22.1
|
|
jobs:
|
|
|
|
docs:
|
|
name: Check docs are buildable
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3-venv
|
|
- uses: actions/checkout@v2
|
|
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:
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- name: Install build dependencies needed for VPU plugin
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install libusb-1.0-0-dev
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: v1.43.0
|
|
args: -v --timeout 5m
|
|
skip-go-installation: true
|
|
|
|
build:
|
|
name: Build and check device plugins
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
- name: Install build dependencies needed for VPU plugin
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install libusb-1.0-0-dev
|
|
- 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-20.04
|
|
strategy:
|
|
matrix:
|
|
image:
|
|
- intel-fpga-admissionwebhook
|
|
- intel-fpga-initcontainer
|
|
- intel-gpu-initcontainer
|
|
- intel-gpu-plugin
|
|
- intel-fpga-plugin
|
|
- intel-qat-plugin
|
|
- intel-qat-plugin-kerneldrv
|
|
- intel-vpu-plugin
|
|
- intel-deviceplugin-operator
|
|
- intel-sgx-admissionwebhook
|
|
- intel-sgx-plugin
|
|
- intel-sgx-initcontainer
|
|
- intel-dsa-plugin
|
|
- intel-idxd-config-initcontainer
|
|
- intel-dlb-plugin
|
|
|
|
# Demo images
|
|
- crypto-perf
|
|
- dsa-accel-config-demo
|
|
- intel-opencl-icd
|
|
- opae-nlb-demo
|
|
- openssl-qat-engine
|
|
- sgx-sdk-demo
|
|
- sgx-aesmd-demo
|
|
- ubuntu-demo-openvino
|
|
- dlb-dpdk-demo
|
|
- dlb-libdlb-demo
|
|
builder: [buildah, docker]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
- uses: actions/setup-go@v2
|
|
- run: make -e vendor
|
|
- name: Install Buildah and RunC
|
|
if: matrix.builder == 'buildah'
|
|
run: |
|
|
sudo apt-get -qq -y purge podman containers-image buildah
|
|
. /etc/os-release
|
|
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
|
|
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key
|
|
sudo apt-key add - < Release.key
|
|
sudo apt-get update -qq
|
|
sudo apt-get -qq -y install buildah
|
|
echo -e '[registries.search]\nregistries = ["docker.io"]\n\n' | sudo tee /etc/containers/registries.conf
|
|
# install runc
|
|
sudo curl -L https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.amd64 -o /usr/bin/runc
|
|
sudo chmod +x /usr/bin/runc
|
|
- name: Build image
|
|
env:
|
|
IMAGE_NAME: ${{ matrix.image }}
|
|
BUILDER_NAME: ${{ matrix.builder }}
|
|
run: |
|
|
make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
|
|
|
|
kind-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- name: Test SGX & FPGA Admission Webhook, Deploy Operator
|
|
run: |
|
|
make test-with-kind
|