Skip to content

CI/CD

CI/CD #823

Workflow file for this run

# Copyright (c) Microsoft Corporation
# SPDX-License-Identifier: MIT
# Main YML file for the CICD pipeline
name: CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Run on a daily schedule to perform the full set of tests.
schedule:
- cron: '00 21 * * *'
merge_group:
permissions:
id-token: write
contents: read
packages: write
security-events: write # Required by codeql task
concurrency:
# Cancel any CI/CD workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: cicd-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build_ebpf_for_windows:
name: Build ebpf-for-windows
uses: microsoft/ebpf-for-windows/.github/workflows/reusable-build.yml@main
with:
build_artifact: none
build_msi: true
build_nuget: true
build_options: /t:installer\ebpf-for-windows /p:ReleaseJIT='True'
repository: 'microsoft/ebpf-for-windows'
configurations: '["Release"]'
ref: main
perform_skip_check: false
build_bpf_performance:
needs: build_ebpf_for_windows
name: Build BPF Performance tests
strategy:
matrix:
configuration: [ 'Release', 'Debug' ]
option: [ none, sanitizer, coverage ]
platform: [ 'ubuntu-22.04', 'windows-2019' ]
exclude:
- platform: windows-2019
option: sanitizer
- platform: windows-2019
option: coverage
- platform: windows-2022
option: sanitizer
- platform: windows-2022
option: coverage
- platform: ubuntu-22.04
option: jit
uses: ./.github/workflows/Build.yml
with:
platform: ${{ matrix.platform }}
configuration: ${{ matrix.configuration }}
option: ${{ matrix.option }}
test_bpf_performance:
needs: build_bpf_performance
name: Test BPF Performance
strategy:
matrix:
configuration: [ 'Release' ]
platform: [ 'windows-2019', 'windows-2022', 'ubuntu-22.04' ]
option: [ none, jit ]
exclude:
- platform: windows-2019
option: sanitizer
- platform: windows-2019
option: coverage
- platform: windows-2022
option: sanitizer
- platform: windows-2022
option: coverage
- platform: ubuntu-22.04
option: jit
uses: ./.github/workflows/Test.yml
with:
platform: ${{ matrix.platform }}
configuration: ${{ matrix.configuration }}
option: ${{ matrix.option }}
finish:
needs:
- test_bpf_performance
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Coveralls Finished
uses: coverallsapp/github-action@1134c89e4bf10443bf8f0ec69640b667cfd91041 # v2.3.1
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
upload_results:
if: github.event_name == 'schedule' || github.event_name == 'push'
needs:
- test_bpf_performance
uses: ./.github/workflows/UploadPerfResults.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}