-
Notifications
You must be signed in to change notification settings - Fork 5
120 lines (107 loc) · 3.38 KB
/
CICD.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# 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@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 }}