[DNM] Testing New Packaging Workflow #4
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
name: Package sentry-native Nuget | |
on: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
sentry-native-tag: | |
type: string | |
description: The tag of sentry-native to build | |
required: true | |
default: "0.6.6" | |
sentry-native-backend: | |
type: choice | |
options: | |
- INPROC | |
- CRASHPAD | |
- BREAKPAD | |
required: true | |
default: CRASHPAD | |
jobs: | |
package-nuget: | |
strategy: | |
matrix: | |
arch: [ | |
{ runner: macos-latest, platform: macOS}, | |
{ runner: windows-latest, platform: win64 } | |
] | |
runs-on: ${{ matrix.arch.runner }} | |
steps: | |
- name: Checkout swift-sentry sources | |
uses: actions/checkout@v4 | |
with: | |
path: "swift-sentry" | |
- name: Checkout sentry-native sources | |
uses: actions/checkout@v4 | |
with: | |
repository: getsentry/sentry-native | |
path: "sentry-native" | |
ref: ${{ github.event.inputs.sentry-native-tag }} | |
submodules: 'recursive' | |
- name: Setup Visual Studio | |
if: ${{ matrix.arch.platform == 'win64' }} | |
uses: compnerd/gha-setup-vsdevenv@main | |
with: | |
host_arch: arm64 | |
components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' | |
arch: amd64 | |
- name: Configure sentry-native (Windows) | |
if: ${{ matrix.arch.platform == 'win64' }} | |
run: | | |
cmake -B ${{ github.workspace }}/build/${{ matrix.arch.platform }} ` | |
-D CMAKE_BUILD_TYPE=RelWithDebInfo ` | |
-S ${{ github.workspace }}/sentry-native ` | |
-D CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION="10.0.19041.0" ` | |
-G "Visual Studio 17 2022" ` | |
-A x64 | |
- name: Configure sentry-native | |
run: | | |
cmake -B ${{ github.workspace }}/build/${{ matrix.arch.platform }} ` | |
-D CMAKE_BUILD_TYPE=RelWithDebInfo ` | |
-S ${{ github.workspace }}/sentry-native ` | |
-A x64 | |
- name: Build sentry-native | |
run: cmake --build ${{ github.workspace }}/build/${{ matrix.arch.platform }} --parallel --config RelWithDebInfo | |
- name: Install sentry-native | |
run: cmake --install ${{ github.workspace }}/build/${{ matrix.arch.platform }} --prefix ${{ github.workspace }}/install/${{ matrix.arch.platform }} --config RelWithDebInfo | |
- name: Upload Install Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sentry-native-${{ matrix.arch.platform }}-${{ github.event.inputs.sentry-native-tag }}-${{ github.event.inputs.sentry-native-backend.lowercase }} | |
path: ${{ github.workspace }}/install/${{ matrix.arch.platform }} |