Skip to content

new: support eBPF iterators on file descriptors #58

new: support eBPF iterators on file descriptors

new: support eBPF iterators on file descriptors #58

Workflow file for this run

name: Linting
on:
pull_request:
push:
branches:
- main
jobs:
golangci:
name: Lint golang files
runs-on: ubuntu-22.04
steps:
- name: Install deps
run: |
sudo apt update -y
sudo apt install -y --no-install-recommends build-essential git clang llvm libelf-dev
git clone https://github.com/libbpf/libbpf.git --branch v1.2.0 --single-branch
pushd libbpf/src
sudo make install
popd
sudo rm -rf ./libbpf
- name: Checkout commit
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.20'
check-latest: true
- name: Build
run: |
go generate ./...
go build .
go clean -modcache
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: false
version: v1.53.3
args: --timeout=900s
gomodtidy:
name: Enforce go.mod tidiness
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
ref: "${{ github.event.pull_request.head.sha }}"
repository: ${{github.event.pull_request.head.repo.full_name}}
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.20'
check-latest: true
- name: Execute go mod tidy and check the outcome
working-directory: ./
run: |
go mod tidy
exit_code=$(git diff --exit-code)
exit ${exit_code}
- name: Print a comment in case of failure
run: |
echo "The go.mod and/or go.sum files appear not to be correctly tidied.
Please, rerun go mod tidy to fix the issues."
exit 1
if: |
failure() && github.event.pull_request.head.repo.full_name == github.repository