Skip to content

jaroslav-fedor-swi is running GitHub Actions #101

jaroslav-fedor-swi is running GitHub Actions

jaroslav-fedor-swi is running GitHub Actions #101

Workflow file for this run

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: build-and-test
run-name: ${{ github.actor }} is running GitHub Actions
on:
pull_request:
env:
BENV_IMAGE_AMD: public.ecr.aws/u7d6c4a3/solarwinds-opentelemetry-network:buil-env-buildx
BENV_IMAGE_ARM: public.ecr.aws/u7d6c4a3/solarwinds-opentelemetry-network:build-env-arm64
concurrency:
group: build-and-test-${{ github.event.pull_request_number || github.ref }}
cancel-in-progress: true
jobs:
clang-format-check:
runs-on: ubuntu-20.04
name: clang-format-check
steps:
- name: Print github workspace
run: |
echo "github.workspace = ${{ github.workspace }}"
echo "pr.ref = ${{github.event.pull_request.head.ref}}"
echo "github.ref = ${{ github.ref }}"
echo "$GITHUB_CONTEXT"
- name: Check out the codebase
uses: actions/checkout@v3
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Runs format checker
run: |
sudo apt update
sudo apt install -y clang-format-11
cd ${{ github.workspace }}
./.github/workflows/scripts/check-clang-format.sh
outputs:
date: ${{ steps.date.outputs.date }}
build-reducer:
name: build-reducer
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build-reducer
env:
PASS: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh reducer
build-kernel-collector:
name: build-kernel-collector
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build-kernel-collector
env:
PASS: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh kernel-collector
build-k8s-relay:
name: build-k8s-relay
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build k8s-relay
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh k8s-relay
build-cloud-collector:
name: build-cloud-collector
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build cloud-collector
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh cloud-collector
build-k8s-watcher:
name: build-k8s-watcher
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build k8s-watcher
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh k8s-watcher
build_and_test:
name: build-and-test
runs-on: ubuntu-20.04
needs: [clang-format-check]
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: run unit tests
run: |
echo "github.workspace = ${{ github.workspace }}"
docker pull $BENV_IMAGE
git submodule update --init --recursive
docker run -t \
--rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--env EBPF_NET_SRC_ROOT=/root/src \
--env ARGS="--output-on-failure --repeat until-pass:3" \
--env SPDLOG_LEVEL="trace" \
$BENV_IMAGE \
./build.sh unit_tests test
# build-run-unit-tests-with-asan-and-debug-flags:
# name: build-run-unit-tests-with-asan-and-debug-flags
# runs-on: ubuntu-20.04
# needs: [clang-format-check]
# steps:
# - name: Check out the codebase
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: build unit tests with asan and debug flags on then run all tests
# run: |
# docker pull $BENV_IMAGE
# git submodule update --init --recursive
# docker run -t \
# --rm \
# --mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
# --mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
# --env EBPF_NET_SRC_ROOT=/root/src \
# --env ARGS="--output-on-failure --repeat until-pass:3" \
# --env SPDLOG_LEVEL="trace" \
# $BENV_IMAGE \
# ./build.sh --debug --asan unit_tests test
run-kernel-header-tests:
name: run-kernel-header-tests
needs: [clang-format-check]
runs-on: ubuntu-24.04
env:
EBPF_NET_SRC_ROOT: ${{ github.workspace }}
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
kernel:
- 'channel/**'
- 'cmake/**'
- 'collector/kernel/**'
- 'common/**'
- 'config/**'
- 'ext/**'
- 'geoip/**'
- 'jitbuf/**'
- 'otlp/**'
- 'platform/**'
- 'render/**'
- 'renderc/**'
- 'scheduling/**'
- 'test/kernel/**'
- 'util/**'
github:
- '.github/**'
- name: Run kernel header tests on multiple linux distributions
id: run-kernel-header-tests
if: steps.changes.outputs.kernel == 'true' || steps.changes.outputs.github == 'true'
run: |
# Install vagrant
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant virtualbox
git submodule update --init --recursive
docker run -d -p 5000:5000 --name registry docker.io/library/registry:2
docker run -t --rm \
--mount type=bind,source=$PWD,destination=/root/src,readonly \
--mount type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock \
--env EBPF_NET_SRC_ROOT=/root/src \
--name benv \
--privileged \
$BENV_IMAGE \
./build.sh -j 3 reducer-docker-registry kernel-collector-docker-registry
vagrant plugin install vagrant-sshfs
vagrant plugin install vagrant-scp
./test/kernel/run-tests.sh --kernel-header-test
run-kernel-collector-tests:
name: run-kernel-collector-tests
needs: [clang-format-check]
runs-on: ubuntu-24.04
env:
EBPF_NET_SRC_ROOT: ${{ github.workspace }}
steps:
- name: Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
kernel:
- 'channel/**'
- 'cmake/**'
- 'collector/kernel/**'
- 'common/**'
- 'config/**'
- 'ext/**'
- 'geoip/**'
- 'jitbuf/**'
- 'otlp/**'
- 'platform/**'
- 'render/**'
- 'renderc/**'
- 'scheduling/**'
- 'test/kernel/**'
- 'util/**'
github:
- '.github/**'
- name: Run kernel_collector_test on multiple linux distributions
id: run-kernel-collector-test
if: steps.changes.outputs.kernel == 'true' || steps.changes.outputs.github == 'true'
run: |
# Install vagrant
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant virtualbox
docker run -dt -p 5000:5000 --name registry docker.io/library/registry:2
git submodule update --init --recursive
docker run -t --rm \
--mount type=bind,source=$PWD,destination=/root/src,readonly \
--mount type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock \
--env EBPF_NET_SRC_ROOT=/root/src \
--name benv \
--privileged \
$BENV_IMAGE \
./build.sh -j 3 kernel-collector-test-docker-registry
vagrant plugin install vagrant-sshfs
vagrant plugin install vagrant-scp
./test/kernel/run-tests.sh --kernel-collector-test