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: Build and test
on:
pull_request:
push:
branches:
- main
jobs:
build_and_test:
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 .
- name: Run tests
run: |
sudo -E env "PATH=$PATH" go test ./... -count=1
# use goreleaser to build all supported archs
- name: Build all supported archs
id: run-goreleaser
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
distribution: goreleaser
version: latest
args: release --snapshot --clean
- name: Archive x86_64 tar.gz
uses: actions/upload-artifact@v3
with:
name: x86_64
path: ./dist/bpftree_Linux_x86_64.tar.gz
- name: Archive arm64 tar.gz
uses: actions/upload-artifact@v3
with:
name: arm64
path: ./dist/bpftree_Linux_arm64.tar.gz
- name: Archive s390x tar.gz
uses: actions/upload-artifact@v3
with:
name: s390x
path: ./dist/bpftree_Linux_s390x.tar.gz