Skip to content

Create a sentry-native build workflow #9

Create a sentry-native build workflow

Create a sentry-native build workflow #9

name: Windows Build (sentry-native)
on:
pull_request:
workflow_dispatch:
inputs:
sentry-native-tag:
type: string
description: The tag of sentry-native to build
required: true
jobs:
windows:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
architecture: ["x64"]
steps:
- 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
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 build\${{ matrix.architecture }} `
-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.architecture }}
- name: Build sentry-native
run: cmake --build build\${{ matrix.architecture }} --parallel --config RelWithDebInfo
- name: Install sentry-native
run: cmake --install build\${{ matrix.architecture }} --prefix install\${{ matrix.architecture }} --config RelWithDebInfo
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: sentry-native-windows-${{ github.event.inputs.sentry-native-tag }}-${{ matrix.architecture }}
path: install\${{ matrix.architecture }}