Skip to content

[DNM] Testing New Packaging Workflow #1

[DNM] Testing New Packaging Workflow

[DNM] Testing New Packaging Workflow #1

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:
os: [macos-latest, windows-latest]
arch: [macOS, win64]
runs-on: ${{ matrix.os }}
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'
# If we're running the Windows build we need to seutp Visual Studio
- name: Setup Visual Studio
if: ${{ matrix.arch == '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
run: |
cmake -B ${{ github.workspace }}\build\${{ matrix.arch }} `
-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 ${{ matrix.arch }}
- name: Build sentry-native
run: cmake --build ${{ github.workspace }}\build\${{ matrix.arch }} --parallel --config RelWithDebInfo
- name: Install sentry-native
run: cmake --install ${{ github.workspace }}\build\${{ matrix.arch }} --prefix ${{ github.workspace }}\install\${{ matrix.arch }} --config RelWithDebInfo
- name: Upload Install Artifacts
uses: actions/upload-artifact@v3
with:
name: sentry-native-${{ matrix.arch }}-${{ github.event.inputs.sentry-native-tag }}-${{ github.event.inputs.sentry-native-backend.lowercase }}
path: install\${{ matrix.arch }}