From d397d7f1cfa268e3cbc40ab70ab7e49075b0aaf8 Mon Sep 17 00:00:00 2001 From: Gianni Trevisiol Date: Fri, 17 Mar 2023 22:29:38 -0700 Subject: [PATCH 1/3] Add build_msi flag, build nuget on regular only --- .github/workflows/cicd.yml | 3 +-- .github/workflows/reusable-build.yml | 21 ++++++++++++--------- docs/ReleaseProcess.md | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index fc5d26423c..9f7f125bc8 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -42,6 +42,7 @@ jobs: with: build_artifact: Build-x64 generate_release_package: true + build_msi: true build_nuget: true build_options: /p:ReleaseJIT='True' @@ -52,8 +53,6 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: build_artifact: Build-x64-native-only - generate_release_package: true - build_nuget: true build_options: /p:DisableJIT='True' /p:DisableInterpreter='True' cmake: diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 23f9d796f4..4f58b02c72 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -22,6 +22,9 @@ on: build_codeql: required: false type: boolean + build_msi: + required: false + type: boolean build_nuget: required: false type: boolean @@ -189,29 +192,29 @@ jobs: retention-days: 5 - name: Upload the MSI package (Debug) - if: inputs.build_artifact == 'Build-x64' && matrix.configurations == 'Debug' + if: inputs.build_msi == true && matrix.configurations == 'Debug' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows MSI installer (Debug) + name: ebpf-for-windows - MSI installer (Debug) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - name: Upload the MSI package (Release) - if: inputs.build_artifact == 'Build-x64' && matrix.configurations == 'Release' + if: inputs.build_msi == true && matrix.configurations == 'Release' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows MSI installer (Release) + name: ebpf-for-windows - MSI installer (Release) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - - name: Build nuget package - if: matrix.configurations == 'Release' && inputs.build_nuget == true && steps.skip_check.outputs.should_skip != 'true' + - name: Build the NuGet package + if: inputs.build_nuget == true && matrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true' working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} ${{env.BUILD_OPTIONS}} /t:tools\nuget - - name: Upload the nuget package - if: matrix.configurations == 'Release' && inputs.build_nuget == true && steps.skip_check.outputs.should_skip != 'true' + - name: Upload the NuGet package + if: minputs.build_nuget == true && atrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows nuget + name: ebpf-for-windows - NuGet package (Release) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/*.nupkg - name: Perform CodeQL Analysis diff --git a/docs/ReleaseProcess.md b/docs/ReleaseProcess.md index 629d38fb9c..580af8d8dd 100644 --- a/docs/ReleaseProcess.md +++ b/docs/ReleaseProcess.md @@ -23,7 +23,7 @@ eBPF for Windows: 1. Commit all the changes in the release branch into your forked repo. 1. Create a **Draft** pull-request for the release branch into the main `ebpf-for-windows` repo, and title the PR as *"Release v`X.Y.Z`"* (replace "`X.Y.Z`" with the version number being released). 1. Once the CI/CD pipeline for the PR completes, download the - "`ebpf-for-windows MSI installer (Release)`" and "`ebpf-for-windows nuget`" build artifacts + "`ebpf-for-windows - MSI installer (Release)`" and "`ebpf-for-windows - NuGet package (Release)`" build artifacts (accessible via the "`Actions`" tab on GitHub). 1. Extract the `*.msi` and `*.nupkg` files, respectively, out of them, and rename them in the following format (replace "`X.Y.Z`" with the version number being released): From 9498b73ed4f1f644f33460b64daf00b69d4e1b0c Mon Sep 17 00:00:00 2001 From: Gianni Trevisiol Date: Fri, 17 Mar 2023 22:40:18 -0700 Subject: [PATCH 2/3] Embed artifact name in output name --- .github/workflows/reusable-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 4f58b02c72..fb565ab576 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -195,14 +195,14 @@ jobs: if: inputs.build_msi == true && matrix.configurations == 'Debug' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - MSI installer (Debug) + name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}/Debug) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - name: Upload the MSI package (Release) if: inputs.build_msi == true && matrix.configurations == 'Release' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - MSI installer (Release) + name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}/Release) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - name: Build the NuGet package @@ -211,10 +211,10 @@ jobs: run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} ${{env.BUILD_OPTIONS}} /t:tools\nuget - name: Upload the NuGet package - if: minputs.build_nuget == true && atrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true' + if: inputs.build_nuget == true && matrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - NuGet package (Release) + name: ebpf-for-windows - NuGet package (${{inputs.build_artifact}}/Release) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/*.nupkg - name: Perform CodeQL Analysis From e9a11b656e5f0d22fad903f36797e94a081af3e6 Mon Sep 17 00:00:00 2001 From: Gianni Trevisiol Date: Fri, 17 Mar 2023 23:00:21 -0700 Subject: [PATCH 3/3] env vars --- .github/workflows/reusable-build.yml | 6 +++--- docs/ReleaseProcess.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index fb565ab576..2403d34e38 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -195,14 +195,14 @@ jobs: if: inputs.build_msi == true && matrix.configurations == 'Debug' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}/Debug) + name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}}) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - name: Upload the MSI package (Release) if: inputs.build_msi == true && matrix.configurations == 'Release' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}/Release) + name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}}) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi - name: Build the NuGet package @@ -214,7 +214,7 @@ jobs: if: inputs.build_nuget == true && matrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true' uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce with: - name: ebpf-for-windows - NuGet package (${{inputs.build_artifact}}/Release) + name: ebpf-for-windows - NuGet package (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}}) path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/*.nupkg - name: Perform CodeQL Analysis diff --git a/docs/ReleaseProcess.md b/docs/ReleaseProcess.md index 580af8d8dd..1bd589125f 100644 --- a/docs/ReleaseProcess.md +++ b/docs/ReleaseProcess.md @@ -23,7 +23,7 @@ eBPF for Windows: 1. Commit all the changes in the release branch into your forked repo. 1. Create a **Draft** pull-request for the release branch into the main `ebpf-for-windows` repo, and title the PR as *"Release v`X.Y.Z`"* (replace "`X.Y.Z`" with the version number being released). 1. Once the CI/CD pipeline for the PR completes, download the - "`ebpf-for-windows - MSI installer (Release)`" and "`ebpf-for-windows - NuGet package (Release)`" build artifacts + "`ebpf-for-windows - MSI installer (Build-x64_Release)`" and "`ebpf-for-windows - NuGet package (Build-x64_Release)`" build artifacts (accessible via the "`Actions`" tab on GitHub). 1. Extract the `*.msi` and `*.nupkg` files, respectively, out of them, and rename them in the following format (replace "`X.Y.Z`" with the version number being released):