Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Updated the libbpf version and made changes to the relevant files #278

Updated the libbpf version and made changes to the relevant files

Updated the libbpf version and made changes to the relevant files #278

Workflow file for this run

name: 'Public-CI'
on: [push, pull_request]
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
# Super-linter consists of several lint tools
# lint tools are assigned to the pipeline via the env field
# For more information, please see https://github.com/github/super-linter
super-linter:
permissions:
contents: read # for actions/checkout to fetch code
statuses: write # for github/super-linter to mark status of each linter run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: super-linter
uses: github/super-linter@985ef206aaca4d560cb9ee2af2b42ba44adc1d55 # v4.10.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
VALIDATE_BASH: true
VALIDATE_GO: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_CLANG_FORMAT: true
VALIDATE_JSON: true
# Build stage executes binary builds for CNI and device-plugin
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: 1.19
- name: Install dependencies 1
run: sudo apt-get update && sudo apt install clang llvm gcc-multilib
- name: Install dependencies 2
run: sudo apt-get update && sudo apt-get install -y wget gnupg build-essential libelf-dev pkg-config m4 libpcap-dev gcc-multilib
- name: Install clang16
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qq update
sudo apt-get -qq -y install clang-16 lld-16 llvm-16
- name: Install golang
run: |
sudo wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
- name: Install libxdp from source
run: |
git clone --depth=1 --recurse-submodules https://github.com/xdp-project/xdp-tools.git libxdp
make -C xdp-tools/
make install -C xdp-tools/
- name: Run build
run: make build
# go-static-tools scans code base and packages using go-vet, go mod verify and staticcheck
go-static-tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: 1.19
- name: Install dependencies
run: sudo apt-get update && sudo apt install libbpf-dev clang llvm gcc-multilib
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: run static analysis
run: make static-ci
# unit-test stage
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: 1.19
- name: Install dependencies
run: sudo apt-get update && sudo apt install libbpf-dev clang llvm gcc-multilib
- name: unit-tests
run: make test