Skip to content

[DNM] Testing New Packaging Workflow #9

[DNM] Testing New Packaging Workflow

[DNM] Testing New Packaging Workflow #9

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:
- crashpad
- breakpad
- inproc
- none
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 SENTRY_BACKEND=crashpad `
-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 (macOS)
if: ${{ matrix.arch.platform == 'macOS' }}
run: |
cmake -B ${{ github.workspace }}/build/${{ matrix.arch.platform }} \
-D SENTRY_BACKEND=crashpad \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-S ${{ github.workspace }}/sentry-native \
- 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 }}