Skip to content

wip

wip #431

Workflow file for this run

name: Testing on CI
on:
push:
branches:
- "**"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
jobs:
create-container:
strategy:
matrix:
host:
- name: "ubuntu-latest"
arch: "x64"
- name: "4-core-ubuntu-arm"
arch: "arm64"
distribution:
- name: fedora
version: "41"
- name: fedora
version: "40"
- name: fedora
version: "39"
- name: ubuntu
version: "24.04"
- name: ubuntu
version: "24.10"
runs-on: ["${{ matrix.host.name }}"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push container image
id: build-and-push
uses: docker/build-push-action@v4
with:
file: tools/${{ matrix.distribution.name }}-${{ matrix.distribution.version }}.Dockerfile
push: true
tags: ghcr.io/facebook/bpfilter:${{ matrix.distribution.name }}-${{ matrix.distribution.version }}-${{ matrix.host.arch}}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build:
needs: create-container
runs-on: ["4-core-ubuntu-arm"]
container: ghcr.io/facebook/bpfilter:fedora-41-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure build
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=debug
- name: Build
run: make -C $GITHUB_WORKSPACE/build -j `nproc` bpfilter libbpfilter bfcli
benchmark:
needs: create-container
runs-on: ["4-core-ubuntu-arm"]
container:
image: ghcr.io/facebook/bpfilter:fedora-41-arm64
options: --privileged
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure build
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=debug -DENABLE_BENCHMARK:BOOL=on
- name: Build
run: make -C $GITHUB_WORKSPACE/build -j `nproc` benchmark