Skip to content

Enable stats v2

Enable stats v2 #5934

Workflow file for this run

name: Main collector CI
on:
push:
branches:
- master
- release-*
tags:
- 3.*.*
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- reopened
permissions:
pull-requests: write
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
init:
uses: ./.github/workflows/init.yml
secrets: inherit
with:
cpaas-workflow: false
build-builder-image:
uses: ./.github/workflows/collector-builder.yml
needs: init
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
secrets: inherit
build-collector:
uses: ./.github/workflows/collector.yml
needs:
- init
- build-builder-image
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-image: ${{ needs.init.outputs.collector-image }}
collector-builder-tag: ${{ needs.build-builder-image.outputs.collector-builder-tag }}
arch-drivers-bucket: ${{ needs.init.outputs.cpaas-drivers-bucket }}
module-version: ${{ needs.init.outputs.module-version }}
secrets: inherit
build-test-containers:
uses: ./.github/workflows/integration-test-containers.yml
needs:
- init
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
rebuild-qa-containers: ${{ needs.init.outputs.rebuild-qa-containers == 'true' }}
secrets: inherit
memory-checked-unit-tests:
runs-on: ubuntu-latest
container:
image: quay.io/stackrox-io/collector-builder:${{ needs.build-builder-image.outputs.collector-builder-tag }}
needs:
- build-builder-image
strategy:
fail-fast: false
matrix:
config-args:
- -DADDRESS_SANITIZER=ON
- -DUSE_VALGRIND=ON
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build collector
run: |
cmake -S . -B cmake-build \
${{ matrix.config-args }} \
-DCMAKE_BUILD_TYPE=Debug
make -C cmake-build "-j$(nproc)"
- name: Run unit tests
run: |
ctest -V --test-dir cmake-build
integration-tests:
uses: ./.github/workflows/integration-tests.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
needs:
- init
- build-collector
- build-test-containers
secrets: inherit
k8s-integration-tests:
uses: ./.github/workflows/k8s-integration-tests.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
needs:
- init
- build-collector
- build-test-containers
secrets: inherit
benchmarks:
uses: ./.github/workflows/benchmarks.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: |
always() &&
((github.event_name == 'push' && github.ref_name == 'master') ||
contains(github.event.pull_request.labels.*.name, 'run-benchmark'))
needs:
- init
- build-collector
- build-test-containers
secrets: inherit