Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewige committed Dec 13, 2024
1 parent caaebc5 commit 9eec83e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@ jobs:
# ---------------------------------------------------------------------------

# Perform the regular build.
# regular:
# # Always run this job.
# if: github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch'
# uses: ./.github/workflows/reusable-build.yml
# with:
# ref: ${{ github.ref }}
# repository: ${{ github.repository }}
# build_artifact: Build-x64
# generate_release_package: true
# build_msi: true
# build_nuget: true
# build_options: /p:ReleaseJIT='True'
# configurations: '["Debug", "Release"]'
regular:
# Always run this job.
if: github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/reusable-build.yml
with:
ref: ${{ github.ref }}
repository: ${{ github.repository }}
build_artifact: Build-x64
generate_release_package: true
build_msi: true
build_nuget: true
build_options: /p:ReleaseJIT='True'
configurations: '["Debug", "Release"]'

# Run the unit tests in GitHub.
unit_tests:
# Always run this job.
# needs: regular
needs: regular
if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group'
uses: ./.github/workflows/reusable-test.yml
with:
Expand All @@ -69,9 +69,7 @@ jobs:
# Exclude [processes] test that CodeCoverage can't work with.
test_command: .\unit_tests.exe -d yes ~[processes]
build_artifact: Build-x64
environment: windows-2022
# environment2: windows-2022
environment2: '["windows-2022"]'
environment: '["windows-2022"]'
code_coverage: true
gather_dumps: true
capture_etw: true
Expand All @@ -81,7 +79,7 @@ jobs:
driver_ws2019:
# Always run this job.
# Only run this on repos that have self-host runners.
# needs: regular
needs: regular
if: github.repository == 'microsoft/ebpf-for-windows' && (github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch')
uses: ./.github/workflows/reusable-test.yml
with:
Expand All @@ -90,12 +88,7 @@ jobs:
post_test: .\cleanup_ebpf_cicd_tests.ps1 -KmTracing $true
name: driver_ws2019
build_artifact: Build-x64
# environment: 1ES.Pool=ebpf-cicd-runner-pool-server-2019
environment: 1ES.Pool=ebpf-cicd-runner-pool-server-2019
environment2: '["self-host", "1ES.Pool=ebpf-cicd-runner-pool-server-2019"]'

# configurations: '["Debug", "Release"]'

environment: '["self-hosted", "1ES.Pool=ebpf-cicd-runner-pool-server-2019"]'
self-hosted-runner: true
# driver test copies dumps to testlog folder.
gather_dumps: false
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
matrix:
configurations: ${{ fromJSON(inputs.configurations) }}

runs-on: ${{ fromJSON(inputs.environment2) }}
runs-on: ${{ fromJSON(inputs.environment) }}

env:
# Configuration type to build.
Expand All @@ -91,10 +91,6 @@ jobs:
CXPLAT_MEMORY_LEAK_DETECTION: ${{inputs.leak_detection}}
DUMP_PATH: c:/dumps/x64/${{matrix.configurations}}
TEST_TIMEOUT: 3600 # 1 hour timeout for tests.
1ES_POOL: fromJSON('["self-hosted", "1ES.Pool=ebpf-cicd-runner-pool-" + ${{inputs.environment}} ]')

# runs-on: ${{ (inputs.self-hosted-runner == true) && fromJSON('["self-hosted", "1ES.Pool=ebpf-cicd-runner-pool-"inputs.environment ]') || inputs.environment }}
# runs-on: ${{ (inputs.self-hosted-runner == true) && env.1ES_POOL || inputs.environment }}

steps:
- name: Harden Runner
Expand Down

0 comments on commit 9eec83e

Please sign in to comment.