CI/CD #918
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
# 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-2022' ] | |
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-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@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2.3.4 | |
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 }} |