forked from netgroup-polito/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into HEAD
- Loading branch information
Showing
782 changed files
with
857,847 additions
and
111,687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Dockerfile* | ||
build | ||
.*.swp | ||
docker/Dockerfile* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Build/Push container" | ||
description: "Build a BCC CI container and push it when not a pull-request." | ||
|
||
inputs: | ||
os_distro: | ||
description: "OS Disctribution. Ex: ubuntu" | ||
required: true | ||
os_version: | ||
description: "Version of the OS. Ex: 20.04" | ||
required: true | ||
os_nick: | ||
description: "Nickname of the OS. Ex: focal" | ||
required: true | ||
llvm_versions: | ||
description: "Space separated list of llvm versions to install in the container. Only supported for Ubuntu containers." | ||
type: string | ||
default: "12" | ||
registry: | ||
description: "Registry where to push images" | ||
default: ghcr.io | ||
password: | ||
description: "Password used to log into the docker registry." | ||
push: | ||
description: "Whether or not to push the build image" | ||
type: boolean | ||
default: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Login against registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ inputs.registry }} | ||
if: ${{ inputs.push == 'true' && github.event_name != 'pull_request' }} | ||
|
||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ inputs.registry }} | ||
username: ${{ github.actor }} | ||
password: ${{ inputs.password }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: ${{ inputs.push == 'true' && github.event_name != 'pull_request' }} | ||
build-args: | | ||
VERSION=${{ inputs.os_version }} | ||
SHORTNAME=${{ inputs.os_nick }} | ||
LLVM_VERSION=${{ inputs.llvm_versions }} | ||
file: docker/build/Dockerfile.${{ inputs.os_distro }} | ||
tags: ${{ inputs.registry }}/${{ github.repository }}:${{ inputs.os_distro }}-${{ inputs.os_version }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Publish Build Containers | ||
|
||
on: | ||
# We want to update this image regularly and when updating master | ||
schedule: | ||
- cron: '00 18 * * *' | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- 'docker/build/**' | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
|
||
publish_ghcr: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
packages: write # to push container | ||
name: Publish To GitHub Container Registry | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ | ||
{distro: "ubuntu", version: "20.04", nick: focal, installed_llvm_versions: "12 15 17"}, | ||
{distro: "fedora", version: "38", nick: "f38", installed_llvm_versions: "this is not used"}, | ||
] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Build and push | ||
uses: ./.github/actions/build-container | ||
with: | ||
os_distro: ${{ matrix.os.distro }} | ||
os_version: ${{ matrix.os.version }} | ||
os_nick: ${{ matrix.os.nick }} | ||
llvm_versions: ${{ matrix.os.installed_llvm_versions }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Publish Build Artifacts | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
# Optionally publish container images to custom docker repository, | ||
# guarded by presence of all required github secrets. | ||
# GitHub secrets can be configured as follows: | ||
# - DOCKER_IMAGE = docker.io/myorg/bcc | ||
# - DOCKER_USERNAME = username | ||
# - DOCKER_PASSWORD = password | ||
publish_dockerhub: | ||
name: Publish To Dockerhub | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
|
||
- name: Initialize workflow variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
if [ -n "${DOCKER_IMAGE}" ] && \ | ||
[ -n "${DOCKER_USERNAME}" ] && \ | ||
[ -n "${DOCKER_PASSWORD}" ];then | ||
echo "Custom docker credentials set, will push an image" | ||
echo ::set-output name=DOCKER_PUBLISH::true | ||
else | ||
echo "Custom docker credentials not, skipping" | ||
fi | ||
env: | ||
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build container image and publish to registry | ||
id: publish-registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
if: ${{ steps.vars.outputs.DOCKER_PUBLISH }} | ||
with: | ||
name: ${{ secrets.DOCKER_IMAGE }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
workdir: . | ||
dockerfile: Dockerfile.ubuntu | ||
snapshot: true | ||
cache: ${{ github.event_name != 'schedule' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
[submodule "src/cc/libbpf"] | ||
path = src/cc/libbpf | ||
url = https://github.com/libbpf/libbpf.git | ||
[submodule "libbpf-tools/bpftool"] | ||
path = libbpf-tools/bpftool | ||
url = https://github.com/libbpf/bpftool | ||
[submodule "libbpf-tools/blazesym"] | ||
path = libbpf-tools/blazesym | ||
url = https://github.com/libbpf/blazesym |
Oops, something went wrong.