From e73c66eef4458d7528989447c3a7426a33bf0053 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 28 Nov 2023 14:20:57 -0800 Subject: [PATCH] BCNY CI Support - Use recursive cloning for submodules to get the full tree that we need to build. - Adjust the build rules to stage and package up an artifact with the release content. This will enable us to create releases to avoid constantly having to build the dependencies. --- .github/workflows/bcny-ci.yml | 48 ++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bcny-ci.yml b/.github/workflows/bcny-ci.yml index b751183fb..833637693 100644 --- a/.github/workflows/bcny-ci.yml +++ b/.github/workflows/bcny-ci.yml @@ -1,4 +1,4 @@ -name: CI +name: BCNY CI on: workflow_dispatch: @@ -15,26 +15,56 @@ jobs: matrix: include: - - arch: 'amd64' + - arch: 'AMD64' platform: 'x64' - - arch: 'arm64' + - arch: 'ARM64' platform: 'ARM64' steps: - uses: actions/checkout@v4 + with: + submodules: "recursive" - uses: compnerd/gha-setup-vsdevenv@main with: host_arch: amd64 arch: ${{ matrix.arch }} + - name: Build Workaround + run: | + git config --global user.email "builder@thebrowser.company" + git config --global user.name "Arc Builder" + git fetch origin pull/92/head + git cherry-pick FETCH_HEAD + git fetch origin pull/93/head + git cherry-pick FETCH_HEAD + working-directory: external/crashpad + - name: Configure Sentry run: > - cmake -B out - -D CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0.19041.0 - -G "Visual Studio 17 2022" - -A ${{ matrix.platform }} - -D CMAKE_SYSTEM_NAME=Windows + cmake -B out ` + -D CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0.19041.0 ` + -G "Visual Studio 17 2022" ` + -A ${{ matrix.platform }} ` + -D CMAKE_SYSTEM_NAME=Windows ` -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} - name: Build Sentry - run: cmake --build out --config Release + run: cmake --build out --config RelWithDebInfo + + - name: Stage Sentry + run: | + New-Item -ItemType Directory -Path sentry-native\bin\win64 -Force | Out-Null + New-Item -ItemType Directory -Path sentry-native\include -Force | Out-Null + New-Item -ItemType Directory -Path sentry-native\lib\win64 -Force | Out-Null + Copy-Item include\sentry.h sentry-native\include\ + Copy-Item out\RelWithDebInfo\sentry.dll sentry-native\bin\win64\ + Copy-Item out\RelWithDebInfo\sentry.pdb sentry-native\bin\win64\ + Copy-Item out\crashpad_build\handler\RelWithDebInfo\crashpad_wer.dll sentry-native\bin\win64\ + Copy-Item out\crashpad_build\handler\RelWithDebInfo\crashpad_wer.pdb sentry-native\bin\win64\ + Copy-Item out\crashpad_build\handler\RelWithDebInfo\crashpad_handler.exe sentry-native\bin\win64\ + Copy-Item out\RelWithDebInfo\sentry.lib sentry-native\lib\win64\ + + - uses: actions/upload-artifact@v3 + with: + name: sentry-native-windows-${{ matrix.arch }} + path: sentry-native